ورود

View Full Version : چطور پنجره درایو e یا مثلا h رو باز کنیم ؟



mehdi_moosavi
شنبه 20 فروردین 1384, 06:56 صبح
سلام
این دستور برای باز کردن پنجره control panel از طریق برنام است:

ShellExecute(Form1.Handle,nil,'rundll32','shell32. dll,H:\_RunDLL',nil,SW_SHOWNORMAL);

اگه بخواهیم پنجره درایو e یا مثلا h رو باز کنیم باید چه دستوری بنویسیم؟

علیرضا جاوید
شنبه 20 فروردین 1384, 09:56 صبح
This method allows you to execute any commands in a folder's shortcut menu or stored in the registry.

To open a folder, use either of the following calls:

ShellExecute(handle, NULL, <path_to_folder>, NULL, NULL, SW_SHOWNORMAL);


or

ShellExecute(handle, "open", <path_to_folder>, NULL, NULL, SW_SHOWNORMAL);


To explore a folder, use:

ShellExecute(handle, "explore", <path_to_folder>, NULL, NULL, SW_SHOWNORMAL);


To launch the Shell's Find utility for a directory, use:

ShellExecute(handle, "find", <path_to_folder>, NULL, NULL, 0);


If lpOperation is NULL, the function opens the file specified by lpFile. If lpOperation is "open" or "explore", the function will attempt to open or explore the folder.

Gladiator
شنبه 20 فروردین 1384, 10:30 صبح
winexec('explorer.exe H:',sw_normal);

Delphi Skyline
شنبه 20 فروردین 1384, 11:04 صبح
uses : shellapi



shellexecute(handle,'open',pchar('c:\'),'','',sw_s how);


یا


uses : shellapi



chdir('c:\');
shellexecute(handle,'open',pchar(''),'','',sw_show );


موفق باشید

محمد میرمصطفی
شنبه 20 فروردین 1384, 12:45 عصر
ShellExecute(Handle, "explore", "c:\\", NULL, NULL, SW_SHOWNORMAL );
البته تو ++C