How can I execute OpenDialog?
Applies To: C++Builder 1 or higher
Category: Knowledge Base

-
- Start a new application.
-
- Add an OpenDialog.
-
- Add a Button. Edit its OnClick event:
-
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- if(OpenDialog1->Execute())
- Caption = OpenDialog1->FileName;
- }
-
- When the user click on the Button, the standard Open File dialog shows. Once a file is selected, its path is displayed in the caption bar.
C++Builder Developer's Network
Copyright © Yoto Yotov