Articles   Members Online: 3
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How display the standard Property dialog for file, folder or drive Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
04-Jun-03
Category
Files Operation
Language
Delphi 2.x
Views
207
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Mike Shkolnik 

How display the standard Property dialog for file, folder or drive?

Answer:

Sometimes you need show the standard dialog with file properties from own 
application (especially if you develop some file manager) 

You may easy solve this task - just run next code: 
1   
2   function ShowFilePropertiesDialog(hWndOwner: HWND; const FileName: string): Boolean;
3   var
4     Info: TShellExecuteInfo;
5   begin
6     { Fill in the SHELLEXECUTEINFO structure }
7     with Info do
8     begin
9       cbSize := SizeOf(Info);
10      fMask := SEE_MASK_NOCLOSEPROCESS or
11        SEE_MASK_INVOKEIDLIST or
12        SEE_MASK_FLAG_NO_UI;
13      wnd := hWndOwner;
14      lpVerb := 'properties';
15      lpFile := pChar(FileName);
16      lpParameters := nil;
17      lpDirectory := nil;
18      nShow := 0;
19      hInstApp := 0;
20      lpIDList := nil;
21    end;
22  
23    { Call Windows to display the properties dialog. }
24    Result := ShellExecuteEx(@Info);
25  end;


This is the same dialog box that Windows Explorer displays when viewing an object's 
properties. For example, from this dialog user can change permissions for folder or 
check free space for drive. 

You may specify a file name or folder name or drive letter. For example: 
26  
27  ShowFilePropertiesDialog(Application.Handle, 'd:\debit.xls')
28  
29  //or 
30  
31  ShowFilePropertiesDialog(Application.Handle, 'd:\Oracle')
32  
33  //or 
34  
35  ShowFilePropertiesDialog(Application.Handle, 'd:\')


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC