Skip to content
Snippets Groups Projects
Commit 476e8db0 authored by rswindell's avatar rswindell
Browse files

Bring the CtrlDirectory dialog to the front of the desktop automatically.

parent e4e29b2a
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@
//---------------------------------------------------------------------
#pragma resource "*.dfm"
TCtrlPathDialog *CtrlPathDialog;
//---------------------------------------------------------------------
//---------------------------------------------------------------------
__fastcall TCtrlPathDialog::TCtrlPathDialog(TComponent* AOwner)
: TForm(AOwner)
{
......@@ -50,13 +50,14 @@ __fastcall TCtrlPathDialog::TCtrlPathDialog(TComponent* AOwner)
void __fastcall TCtrlPathDialog::BrowseButtonClick(TObject *Sender)
{
OpenDialog->InitialDir=Edit->Text;
OpenDialog->Options << ofFileMustExist;
OpenDialog->Options << ofFileMustExist;
if(OpenDialog->Execute()==true)
Edit->Text=OpenDialog->FileName;
}
//---------------------------------------------------------------------------
void __fastcall TCtrlPathDialog::FormShow(TObject *Sender)
{
Application->BringToFront();
}
//---------------------------------------------------------------------------
......@@ -59,6 +59,7 @@ __published:
TButton *BrowseButton;
TOpenDialog *OpenDialog;
void __fastcall BrowseButtonClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
private:
public:
virtual __fastcall TCtrlPathDialog(TComponent* AOwner);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment