Re: ShowModal screen position
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Jun 2006 23:56:29 +0200
"JamesR" <wizzer90@xxxxxxxxxxx> wrote in message
news:1149627519.403401.151240@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<positioning a modal form>
Ahh I see. I was thinking of something along these lines, but I'm not
sure how to actually display the form modally at a certain position on
the screen (when you have worked out the position)? ShowModal only
returns an integer and doesn't allow you to specify anything.
ShowModal does not offer anything in this regard, no. More likely the
sequence is Create - set Top/Left - ShowModal. The TCustomForm.Position
property should probably be set to poDesigned, although I'm not sure
that this will not reset the position to the one in the .dfm file.
Some quick grepping of Forms.pas seems to indicate that this Position
property (TScrollbar has one, too) is used only in the WndProc method,
and only uses poDefault[Pos/Size] to inhibit changes. Obviously, there
must be more to it, there being more values. But it looks as if it
should work to place a poDesigned form where you want it before the
ShowModal call.
But I _didn't_ try it.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: ShowModal screen position
- From: JamesR
- Re: ShowModal screen position
- References:
- ShowModal screen position
- From: JamesR
- Re: ShowModal screen position
- From: Andreas Koch
- Re: ShowModal screen position
- From: JamesR
- ShowModal screen position
- Prev by Date: Stretching and aligning components to form size
- Next by Date: Re: Stretching and aligning components to form size
- Previous by thread: Re: ShowModal screen position
- Next by thread: Re: ShowModal screen position
- Index(es):
Relevant Pages
|