Re: ShowModal screen position



"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


.



Relevant Pages

  • Re: Displaying a non-modal form
    ... > non-modal form called Notification form, but I could not do it in VB ... > I get the Error 401 but as all might have noticed in Microsoft Outlook ... > you are watching a modal form for instance the Option dialog box, ... Call it passing certain pieces of info and it will display the form for you? ...
    (microsoft.public.vb.general.discussion)
  • Re: Display Modal Form but Still Process from Parent Form?
    ... How does the modal form close? ... The panel can cover all your other UI elements if you don't ... I would like Form A to display a "Waiting..." ... > 2) Prevents me from having to disable controls on Form A until the ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: thisform.visible
    ... I have a modal form that is displayed by another form. ... line in the load event of the modal form it ... will not display unless there is a debugger breakpoint in the init event ...
    (microsoft.public.fox.programmer.exchange)
  • ActiveX Control, Displaying modeless form -- Error 401
    ... I know you can't display a modeless form when a modal form is ... I created an activeX ... error 401 "can't show non modal form, ... parent application to loose focus. ...
    (microsoft.public.vb.general.discussion)
  • Re: Update table from another table...
    ... display the modal form, and then suddenly you are talking about not ... Student Name ... there are two ways to get rid of a modal form. ... Is this also a top-level form? ...
    (microsoft.public.fox.vfp.forms)