Article View: borland.public.cppbuilder.nativeapi
Article #13028Re: Want to change position of standard dialogs
From: Rodolfo Frino
Date: Thu, 30 Oct 2003 23:23
Date: Thu, 30 Oct 2003 23:23
65 lines
2761 bytes
2761 bytes
If you don't mind to have a short display in the middle (ugly) followed with
the dialog
in the position that you want, you can do this:
...
TOpenDialog* OpenDialog1;
//--------------------------------------------------------------------------
-
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
//CREATE OPENDIALOG
OpenDialog1 = new TOpenDialog(this);
OpenDialog1->OnSelectionChange = OpenDialog1SelectionChange;
}
//--------------------------------------------------------------------------
-
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
OpenDialog1->FileName = "doc.c";
if (OpenDialog1->Execute())
{
// Place your code here
}
}
void __fastcall TForm1::OpenDialog1SelectionChange(TObject *Sender)
{
MoveWindow(
FindWindow(NULL, "Open"), // handle of window
0, // horizontal position
0, // vertical position
800, // width
300, // height
true // rep
);
}
"God not only plays dice with the universe, and sometimes throws them where
they cannot be seen, but also his dice are sometimes loaded" Rodolfo, 2003
"Robert Schimpfle" <schi2401@uni-trier.de> wrote in message
news:3FA01311.62845116@uni-trier.de...
> Hi!
>
> Can I change the position of standard dialogs in C-Builder?
>
> e. g.:
>
> There is a form with a TOpenDialog OpenInputFile;
> if I use the command "OpenInputFile->Show ();", the dialog is placed
> right in the middle of my screen.
> Can I force C-Builder / Windows to put this dialog at another place, f.
> i. top left or at a specified point?
>
> I am using C-Builder 4, NT 4.0
>
> thanks
>
> Robert
Technical Details
Message-ID:
<3fa19d6a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!newsfeed.news2me.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3FA01311.62845116@uni-trier.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5023092a61a6c0b9 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-30 15:32:10 PST From: "Rodolfo Frino" <rodolfowrvxg527u7qfrino@yahoo.com.jki> Newsgroups: borland.public.cppbuilder.nativeapi References: <3FA01311.62845116@uni-trier.de> Subject: Re: Want to change position of standard dialogs Date: Fri, 31 Oct 2003 10:23:38 +1100 Lines: 67 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 203.206.18.113 Message-ID: <3fa19d6a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067556202 203.206.18.113 (30 Oct 2003 15:23:22 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!newsfeed.news2me.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail