Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2008

Tip: Looking for answers? Try searching our database.

MessageBox location

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kelvin.koogan@googlemail.com - 14 Jan 2008 21:01 GMT
I am having difficulty persuading MessageBoxes to appear over my
application (using C++/CLI in VS2005). I would expect

MessageBox::Show(this, "Some message");

to cause the message box to appear over the Form pointed to by this,
but it doesn't seem to work, it appears centered on the screen.

Any idea what I might be doing wrong?

TIA,
KK
PvdG42 - 15 Jan 2008 15:27 GMT
>I am having difficulty persuading MessageBoxes to appear over my
> application (using C++/CLI in VS2005). I would expect
[quoted text clipped - 8 lines]
> TIA,
> KK

I've tested in XP and Vista with both VS 2005 and VS 2008. I get the same
behavior. It could be a long running bug, or something we don't understand
about the Show method. Hopefully, somebody else will jump in here and open
our eyes :)
David Wilkinson - 15 Jan 2008 17:10 GMT
> I've tested in XP and Vista with both VS 2005 and VS 2008. I get the
> same behavior. It could be a long running bug, or something we don't
> understand about the Show method. Hopefully, somebody else will jump in
> here and open our eyes :)

PvdG42:

This is standard Windows behavior. In MFC, AfxMessageBox() achieves
centering on the parent by using a Windows hook.

I'm sure there is some way to do this in .NET, but I don't know what it is.

Signature

David Wilkinson
Visual C++ MVP

PvdG42 - 15 Jan 2008 18:41 GMT
> This is standard Windows behavior. In MFC, AfxMessageBox() achieves
> centering on the parent by using a Windows hook.
>
> I'm sure there is some way to do this in .NET, but I don't know what it
> is.

I feel better. At least I'm not the only one who doesn't know how to do it
:)
Thanks, David.
PLS - 25 Jan 2008 08:52 GMT
> > I've tested in XP and Vista with both VS 2005 and VS 2008. I get the
> > same behavior. It could be a long running bug, or something we don't
[quoted text clipped - 7 lines]
>
> I'm sure there is some way to do this in .NET, but I don't know what it is.

You do it the way you just said, you use a windows hook.

If it's any help, I have code I can post that uses a windows hook to
place arbitrary text on the buttons of a message box.

   ++PLS

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.