Home All Groups Group Topic Archive Search About

Possible to control MessageBox location?

Author
2 May 2006 12:08 PM
jmelkerson
In VB.Net 2005, is it possible to make MessageBoxes pop up somewhere other
than centered on the Desktop?  I develop on/for dual monitor systems and
would like my MessageBoxes to not be split between the two physical monitors.

Author
2 May 2006 1:57 PM
Herfried K. Wagner [MVP]
"jmelkerson" <jmelker***@discussions.microsoft.com> schrieb:
> In VB.Net 2005, is it possible to make MessageBoxes pop up somewhere other
> than centered on the Desktop?

Not really, except with a Win32 dialog hook.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
2 May 2006 2:18 PM
jmelkerson
Would that be a violation of "managed code"?

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "jmelkerson" <jmelker***@discussions.microsoft.com> schrieb:
> > In VB.Net 2005, is it possible to make MessageBoxes pop up somewhere other
> > than centered on the Desktop?
>
> Not really, except with a Win32 dialog hook.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>
Author
2 May 2006 2:24 PM
Herfried K. Wagner [MVP]
"jmelkerson" <jmelker***@discussions.microsoft.com> schrieb:
> Would that be a violation of "managed code"?

Yes.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
2 May 2006 2:40 PM
Larry Lard
jmelkerson wrote:
> In VB.Net 2005, is it possible to make MessageBoxes pop up somewhere other
> than centered on the Desktop?  I develop on/for dual monitor systems and
> would like my MessageBoxes to not be split between the two physical monitors.

What code are you using to display message boxes? If, as your message
suggests, you are using MessageBox.Show, then have you tried using one
of the overloads that takes a window handle of an owning window - does
that help?

I suspect Msgbox won't have this facility.

--
Larry Lard
Replies to group please
Author
2 May 2006 6:11 PM
jmelkerson
Yes, I am using MessageBox.Show.  Also, yes, I have tried a method that
accepts the owner arguement.  Not really knowing what I was doing, I
specified "Me" as the owner.  The MessageBox location did not change as a
result.