469,963 Members | 1,943 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

Positioning Msgboxes and Common Dialog Boxes

In VB .Net is it possible to specify a location (x, y) for message boxes and
the common dialog box class like you can do for windows forms? If so, how is
this accomplished?

Thank you,
John
Nov 20 '05 #1
2 1405
The short answer is no.
The longer answer is that this can be accomplished by using Win32 API calls.
However, in practice I have found it to be problematic sometimes and can have
some undesirable side effects.
Some video drivers try to control where things pop-up, especially in the case of
multiple monitors and other cases.
This can cause some real weirdness, or dialogs pop up in one place, then move to
the other, etc.
In the end, I personally have decided it is more trouble than it is worth and
just let them pop-up where they want.
IF I really need something at a particular place, then I make a custom form and
display it where I want.

Gerald

"jcrouse" <me> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
In VB .Net is it possible to specify a location (x, y) for message boxes and
the common dialog box class like you can do for windows forms? If so, how is
this accomplished?

Thank you,
John

Nov 20 '05 #2
* "jcrouse" <me> scripsit:
In VB .Net is it possible to specify a location (x, y) for message boxes and
the common dialog box class like you can do for windows forms? If so, how is
this accomplished?


You can do that with a Win32 dialog hook (p/invoke on 'SetWindowsHookEx'
etc.).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by John Lauwers | last post: by
9 posts views Thread by Bryan R. Meyer | last post: by
1 post views Thread by Charles Harrison Caudill | last post: by
23 posts views Thread by George | last post: by
3 posts views Thread by Adam Sandler | last post: by
6 posts views Thread by Steve Barnett | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.