2 Replies - 795 Views - Last Post: 12 June 2013 - 04:50 AM Rate Topic: -----

#1 tendaimare  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 170
  • Joined: 04-November 10

msgbox issue

Posted 12 June 2013 - 02:27 AM

Hey I just have a small challenge with my messagebox. When I run my form IN vbModal the messagebox shows up on top of the form in modal view which is just fine. But when I just run the form in NOT VBModal mode the messagebox sort of hides my form or puts it out of sight until I press OK the my form shows up. Is there a way to correct this?

I want to be able to view the messagebox in NOT vbModal mode without "hiding" my form
Is This A Good Question/Topic? 0
  • +

Replies To: msgbox issue

#2 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3836
  • View blog
  • Posts: 13,587
  • Joined: 12-December 12

Re: msgbox issue

Posted 12 June 2013 - 04:35 AM

A MsgBox is always modal.

Is this VB6 or VB.NET? In .NET there is a property TopMost which requires a Win32 API call in VB6. This will keep the form highest, or as high as it can be before the MsgBox is displayed.

Quote

Topmost forms are always displayed at the highest point in the z-order of the windows on the desktop.

But I'm not certain what the following means:

Quote

sort of hides my form or puts it out of sight

If you need more control, then you could create your own version of the MsgBox - a small form.
Was This Post Helpful? 0
  • +
  • -

#3 tendaimare  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 170
  • Joined: 04-November 10

Re: msgbox issue

Posted 12 June 2013 - 04:50 AM

I have a main form right, it comes up as a result of a simple mainform.show. The I have form1 which also comes up as a result of form1.show. But when I run the msgbox function. The form1 disappears leaving the messagebox on top of the mainform in modal form. When I respond to the message box by saying OK (or something else) then the form1 shows up. This behavior is the one I want to run away from.

If I run form1 in Modal view the message box will show up on top of form1, without form1 disappearing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1