Jump to content

Flashing with Sound on Msgbox Or Child GUI


HowaWe
 Share

Recommended Posts

(It is translation.)

Hi,

Can someone please help here...

I want to do something like this. When the message box comes over the gui, the message box will flash if I click on the gui interface. This happens without a problem when we click on the gui window title, but not when we click on the gui window area. How do I get this to happen. (It may also be the child(s) gui instead of the message box).

(gif below.)

I have an example like this.

Thanks.

 

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>


Global $g_idButton3 = 9999

gui1()

Func gui1()
    Local $hGUI1 = GUICreate("Gui 1", 200, 200, -1, -1,-1,$WS_EX_TOPMOST)
    Local $idButton1 = GUICtrlCreateButton("Msgbox 1", 10, 10, 80, 30)
    Local $idButton2 = GUICtrlCreateButton("Show Gui 2", 10, 60, 80, 30)
    GUISetState()

    MsgBox(8192,"Flashing with Sound","No problem clicking on the_"&@CRLF&"parent window title."&@CRLF&"But it doesn't flashing in the_"&@CRLF&"clicking on the gui area.","",$hGUI1) ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $idButton1
                MsgBox($MB_OK, "MsgBox 1", "Test from Gui 1")
            Case $idButton2
                GUICtrlSetState($idButton2, $GUI_DISABLE)
                gui2()
            Case $g_idButton3
                MsgBox($MB_OK, "MsgBox 2", "Test from Gui 2")
        EndSwitch
    WEnd
EndFunc   ;==>gui1

Func gui2()
    Local $hGUI2 = GUICreate("Gui 2", 200, 200, 350, 350)
    Local $g_idButton3 = GUICtrlCreateButton("MsgBox 2", 10, 10, 80, 30)
    GUISetState()
EndFunc   ;==>gui2

 

GIF.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...