Results 1 to 3 of 3

Thread: DialogBox always on top

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    wil
    Posts
    2

    Post

    Some DialogBoxes wich i generate automatic do not display in front of my homescreen. i have to activate them through the taskbar.
    How can I force a DialogBox to be on top?

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    If you're talking about Messageboxes, then use the vbSystemModal Flag to bring it to the Front of everything else, ie.

    MsgBox "Hi", vbSystemModal

    If it's a Form, use the SetForeGroundWindow API, ie.
    Code:
    Private Declare Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow" (ByVal hwnd As Long) As Long
    
    Private Sub Form_Load()
        Call SetForeGroundWindow(Hwnd)
    End Sub

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    wil
    Posts
    2

    Post

    I do not use MsgBoxes. I use "UserDialogs" like this.

    Begin Dialog UserDialog ,,244,96,"Message"
    OKButton 56,64,132,18
    Text 72,16,100,16,"Text",14
    End Dialog

    Dim Dialog_Message As UserDialog

    r% = Dialog(Dialog_Mmessage,-2, 10000)

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