Results 1 to 5 of 5

Thread: Message Box Always on Top

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I know that there is a way to keep a message box oon top of everything, I did it with a form before, and I remember seeing a way to keep the message box on top, I'm not sure if it was in a magazine, or a website, but I know that there is a way, if you know how please share.


    thanks in advance
    NXSupport - Your one-stop source for computer help

  2. #2
    Guest
    The vbSystemModal will keep the Msgbox on top.

    Code:
    Msgbox "Hello Vb-World!", vbSystemModal + vbExclamation, "From Matt"

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    ok, thanks
    NXSupport - Your one-stop source for computer help

  4. #4
    Guest
    If you realy want to control a MessageBox. Check out this API.

    Code:
    Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" _
      (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, _
      ByVal wType As Long) As Long
    
    Public Const MB_ABORTRETRYIGNORE = &H2&
    Public Const MB_APPLMODAL = &H0&
    Public Const MB_DEFAULT_DESKTOP_ONLY = &H20000
    Public Const MB_DEFBUTTON1 = &H0&
    Public Const MB_DEFBUTTON2 = &H100&
    Public Const MB_DEFBUTTON3 = &H200&
    Public Const MB_DEFMASK = &HF00&
    Public Const MB_ICONASTERISK = &H40&
    Public Const MB_ICONEXCLAMATION = &H30&
    Public Const MB_ICONHAND = &H10&
    Public Const MB_ICONINFORMATION = MB_ICONASTERISK
    Public Const MB_ICONMASK = &HF0&
    Public Const MB_ICONQUESTION = &H20&
    Public Const MB_ICONSTOP = MB_ICONHAND
    Public Const MB_MISCMASK = &HC000&
    Public Const MB_MODEMASK = &H3000&
    Public Const MB_NOFOCUS = &H8000&
    Public Const MB_OK = &H0&
    Public Const MB_OKCANCEL = &H1&
    Public Const MB_RETRYCANCEL = &H5&
    Public Const MB_PRECOMPOSED = &H1
    Public Const MB_SETFOREGROUND = &H10000
    Public Const MB_SYSTEMMODAL = &H1000&
    Public Const MB_TASKMODAL = &H2000&
    Public Const MB_TYPEMASK = &HF&
    Public Const MB_USEGLYPHCHARS = &H4
    Public Const MB_YESNO = &H4&
    Public Const MB_YESNOCANCEL = &H3&
    And use thos one under a Event or something.
    Code:
    Call MessageBox(0, "Hi There Stranger", App.Title, MB_OK Or _
      MB_ICONINFORMATION Or MB_SYSTEMMODAL)
    GoodLuck....




  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    thanks
    NXSupport - Your one-stop source for computer help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width