08-11-2015, 06:15 PM
11-11-2015, 05:05 PM
السلام عليكم
اظف ComObj; للوحدة uses
هذا لاخفاء مجلد
procedure TForm1.Button1Click(Sender: TObject);
var
V:Variant;
F:Variant;
FolderPath: String;
begin
// Replace FolderPath with the folder's path (duh)
FolderPath := 'C:\Documents and Settings\serveur\Bureau\1';
case Button1.Tag of
0:
begin
V := CreateOleObject('Scripting.FileSystemObject');
F := V.GetFolder(FolderPath);
// -1 Makes it completly hidden from windoes explorer(works for me on xp)
F.Attributes := -1;
Button1.Tag := 1;
end;
1:
begin
V := CreateOleObject('Scripting.FileSystemObject');
F := V.GetFolder(FolderPath);
// This returns the folder to normal in windows explorer
F.Attributes := 0;
Button1.Tag := 0;
end;
end;
end;
او استعمل هذا الكود البسيط
SetFileAttributes('C:\Documents and Settings\serveur\Bureau\2', FILE_ATTRIBUTE_HIDDEN);
استعمل هذين افضل واسهل
procedure TForm1.Button2Click(Sender: TObject);
begin
SetFileAttributes('C:\Documents and Settings\serveur\Bureau\2', FILE_ATTRIBUTE_HIDDEN);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
FileSetAttr('C:\Documents and Settings\serveur\Bureau\6.txt', faHidden);
end;
اظف ComObj; للوحدة uses
هذا لاخفاء مجلد
procedure TForm1.Button1Click(Sender: TObject);
var
V:Variant;
F:Variant;
FolderPath: String;
begin
// Replace FolderPath with the folder's path (duh)
FolderPath := 'C:\Documents and Settings\serveur\Bureau\1';
case Button1.Tag of
0:
begin
V := CreateOleObject('Scripting.FileSystemObject');
F := V.GetFolder(FolderPath);
// -1 Makes it completly hidden from windoes explorer(works for me on xp)
F.Attributes := -1;
Button1.Tag := 1;
end;
1:
begin
V := CreateOleObject('Scripting.FileSystemObject');
F := V.GetFolder(FolderPath);
// This returns the folder to normal in windows explorer
F.Attributes := 0;
Button1.Tag := 0;
end;
end;
end;
او استعمل هذا الكود البسيط
SetFileAttributes('C:\Documents and Settings\serveur\Bureau\2', FILE_ATTRIBUTE_HIDDEN);
استعمل هذين افضل واسهل
procedure TForm1.Button2Click(Sender: TObject);
begin
SetFileAttributes('C:\Documents and Settings\serveur\Bureau\2', FILE_ATTRIBUTE_HIDDEN);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
FileSetAttr('C:\Documents and Settings\serveur\Bureau\6.txt', faHidden);
end;
13-11-2015, 05:38 PM
استخدم FileSetAttr
25-11-2015, 11:25 PM
مشكورين يا إخوان على المعلومات