Arsip: folder browser dialog

more 13 years ago
rey1024
di delphi ada ga dialog untuk ngambil path folder aja? kalo pake opendialog kan yang di browsing filenya? thx uu

more 13 years ago
MrLee
coba function ini deh;
Function FolderDialog(Const Title: String) : String; // Const Flag: Integer): String;
var lpItemID : PItemIDList;
BrowseInfo : TBrowseInfo;
DisplayName, temppath : array of char;
const Flag = BIF_RETURNONLYFSDIRS;
begin
result := '';
FillChar(BrowseInfo,SizeOf(TbrowseInfo),#0);
with BrowseInfo do
begin
hwndOwner := Application.Handle;
pszDisplayName := @DisplayName;
lpszTitle := Pchar(Title);
ulFlags := Flag;
end;
lpItemID := SHBrowseForFolder(BrowseInfo);
if lpItemID <> nil then
begin
SHGetPathFromIDList(lpItemID,temppath);
Result := temppath;
GlobalFreePtr(lpItemID);
end;
end;
semoga bermanfaat
more 13 years ago
deLogic
bisa menggunakan FileCtrl.SelectDirectory
SelectDirectory Routine Brings up a dialog to allow the user to enter a directory name. Unit FileCtrl Syntax [Delphi] function SelectDirectory(var Directory: string; Options: TSelectDirOpts; HelpCtx: Integer): Boolean; overload; [Delphi] function SelectDirectory(const Caption: string; const Root: WideString; var Directory: string; Options: TSelectDirExtOpts; Parent: TWinControl): Boolean; overload; Description Call SelectDirectory to let the user enter a directory name. Use the first syntax to call the Select Directory dialog box. The directory passed to the function with the Directory parameter appears as the currently selected directory when the dialog box appears. The name of the directory the user selects becomes the value of Directory when the function returns. The HelpCtx parameter is the help context ID number. Use the second syntax to display the Windows directory browser. The Caption parameter specifies a caption for the dialog. The Root parameter specifies the root directory from which to browse. The selected directory is returned as the Directory parameter. When using this syntax, SelectDirectory does not change the value of the current directory. Warning: You can't use the same variable for the Root parameter and the Directory parameter. The Options parameter is a set of values. If Options is the empty set, the user can only select a directory that already exists. No edit box is provided for the user to enter a new directory name. If Options is not empty, the included values determine how the dialog responds when the user types a nonexistent directory name. With either syntax, SelectDirectory returns true if the user selected a directory and chose OK, and false if the user chose Cancel or closed the dialog box without selecting a directory.
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
- Project Group dalam Lazarus
- FastPlaz Database Explorer
- Release: FastPlaz Super Mom v0.12.22
- PascalClass #3: Web Development with Free Pascal
- Makna Pascal di Pascal Indonesia
- Kulgram : Instalasi Lazarus di Perangkat Berbasis ARM
- PascalClass #1: Analisa Database dan Machine Learning
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
- Mengenal OXYGENE – Pascal For .NET
- PascalTalk #5: UX: Research, Design and Engineer
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 3 months ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 3 months ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 months ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 months ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 months ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 months ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 1 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 8 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 8 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 8 years ago
Random Topic
- [help] mysql gagal insert
by binyo in MySQL more 8 years ago - Need Attention Please! About HACKER TATA KRAMA
by DelphiExpert in Hal umum tentang Pascal Indonesia more 14 years ago - Program yang bisa diupdate
by Fransisca_cicilia in Hal umum tentang Pascal Indonesia more 11 years ago - gmn ya kalo mau ambil karakter tertentu di edit text?
by Quzy in Tip n Trik Pemrograman more 13 years ago - ubah string ke integer
by lagisedih in MsSQL more 13 years ago - midas.dll?
by novlog in Hal umum tentang Pascal Indonesia more 14 years ago - [ask] Kill process tanpa melibatkan psapi.dll
by blinkz in Tip n Trik Pemrograman more 13 years ago - Mengganti nama CLASS saat Runtime
by ondelphi in Hal umum tentang Pascal Indonesia more 14 years ago - [?] Cara tambah property saat runtime
by danieljun in Tip n Trik Pemrograman more 13 years ago - Seach pake ADOQuery
by RoenZ in Lain-lain more 12 years ago