Search results for 'Delphi'. 123 post(s) found.
- 2009/09/09 Is there directory selection VCL component in Delphi ?
- 2009/09/09 How to launch application ?
- 2009/09/09 How to print external document ?
- 2009/09/03 Delphi API to get windows temporary directory
- 2009/09/03 Delphi API to get the current working directory
- 2009/09/03 How to resize PNG file in Delphi ?
- 2009/08/22 Get the length of arrays and a string
- 2009/08/22 Delphi Pointer Types
- 2009/08/21 How to read/wrtie INI file in Delphi ?
- 2009/08/19 How to get file created time, modified time, and last accessed time ?
There are FileOpenDialog and FileSaveDialog components on Delphi VCL.
Sometimes you may need Directory Selection dialog, but no components are found on VCL.
Do you know Delphi provides the solution as SelectDirectory().
Here are two examples for Directory Selection.
Following shows directory structure under d:\delphi
procedure TForm1.Button1Click(Sender: TObject);
var
DirSelected: string;
begin
if SelectDirectory('Select a folder:', 'D:\Delphi', DirSelected) then
ShowMessage('You selected ' + DirSelected)
else
ShowMessage('You did not select a folder');
end;
var
DirSelected: string;
begin
if SelectDirectory('Select a folder:', 'D:\Delphi', DirSelected) then
ShowMessage('You selected ' + DirSelected)
else
ShowMessage('You did not select a folder');
end;
Following shows driver names and files as well as directory structure.
procedure TForm1.Button2Click(Sender: TObject);
var
Dir: string;
begin
Dir := 'D:\Delphi';
if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt], 0) then
ShowMessage('You selected ' + Dir)
else
ShowMessage('You did not select a folder');
end;
var
Dir: string;
begin
Dir := 'D:\Delphi';
if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt], 0) then
ShowMessage('You selected ' + Dir)
else
ShowMessage('You did not select a folder');
end;
Another posts included in "Delphi"
| How to launch application ? (0) | 2009/09/09 |
| How to print external document ? (0) | 2009/09/09 |
| Delphi API to get windows temporary directory (0) | 2009/09/03 |
| Delphi API to get the current working directory (0) | 2009/09/03 |
| How to resize PNG file in Delphi ? (0) | 2009/09/03 |
Trackback : Cannot send a trackbact to this post.
You can launch application on windows by ShellExecute function. Following is the simple example to launch application.
In case of running DOS command application such as batch file and you want not to display user, put SW_HIDE in the function option as follow
ShellExecute(Handle, 'open', PChar('c:\test\kurapa_backup.bat'), nil, nil, SW_HIDE);
Another posts included in "Delphi"
| Is there directory selection VCL component in Delphi ? (0) | 2009/09/09 |
| How to print external document ? (0) | 2009/09/09 |
| Delphi API to get windows temporary directory (0) | 2009/09/03 |
| Delphi API to get the current working directory (0) | 2009/09/03 |
| How to resize PNG file in Delphi ? (0) | 2009/09/03 |
| Get the length of arrays and a string (0) | 2009/08/22 |
Trackback : Cannot send a trackbact to this post.
Without complex programming, you can Print document by ShellExecute function.
Another posts included in "Delphi"
| How to launch application ? (0) | 2009/09/09 |
| Is there directory selection VCL component in Delphi ? (0) | 2009/09/09 |
| Delphi API to get windows temporary directory (0) | 2009/09/03 |
| Delphi API to get the current working directory (0) | 2009/09/03 |
| How to resize PNG file in Delphi ? (0) | 2009/09/03 |
| Get the length of arrays and a string (0) | 2009/08/22 |
| Delphi Pointer Types (0) | 2009/08/22 |
Trackback : Cannot send a trackbact to this post.
When you need to access windows temp directory, you can get from environment variables.
Following is the example to Get Temporary Directory.
var
m_tempdir: string
.
.
.
m_tempdir := GetEnvironmentVariable('TEMP');
m_tempdir: string
.
.
.
m_tempdir := GetEnvironmentVariable('TEMP');
Another posts included in "Delphi"
| How to print external document ? (0) | 2009/09/09 |
| How to launch application ? (0) | 2009/09/09 |
| Is there directory selection VCL component in Delphi ? (0) | 2009/09/09 |
| Delphi API to get the current working directory (0) | 2009/09/03 |
| How to resize PNG file in Delphi ? (0) | 2009/09/03 |
| Get the length of arrays and a string (0) | 2009/08/22 |
| Delphi Pointer Types (0) | 2009/08/22 |
| How to read/wrtie INI file in Delphi ? (0) | 2009/08/21 |
Trackback : Cannot send a trackbact to this post.
You can get the current Working Directory information by GetCurrentDir function.
Following is the usage example:
Another posts included in "Delphi"
| Delphi API to get windows temporary directory (0) | 2009/09/03 |
| How to print external document ? (0) | 2009/09/09 |
| How to launch application ? (0) | 2009/09/09 |
| How to resize PNG file in Delphi ? (0) | 2009/09/03 |
| Get the length of arrays and a string (0) | 2009/08/22 |
| Delphi Pointer Types (0) | 2009/08/22 |
| How to read/wrtie INI file in Delphi ? (0) | 2009/08/21 |
| How to get file created time, modified time, and last accessed time ? (0) | 2009/08/19 |
Prev


Rss Feed