Jump to content

How do I create a dialog?


FireLord
 Share

Recommended Posts

I have a label in my program and when I click on it I want a dialog to come up with a choice of options.

Kind of like the dialog you get when you right click on your desktop.

[center]See the Helpfile[/center]

While Alive()
	 DrinkWine();
}
[center][/center]
Link to comment
Share on other sites

#include <GUIConstants.au3>


$Form1 = GUICreate("Form1", 239, 106, 196, 124)
$Label1 = GUICtrlCreateLabel("Right click here.", 62, 32, 81, 17)
$menu=GUICtrlCreateContextMenu($Label1)
GUICtrlCreateMenuItem("Hello",$menu)
GUICtrlCreateMenuItem("Bye",$menu)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Label1
    EndSwitch
WEnd

Link to comment
Share on other sites

#include <GUIConstants.au3>


$Form1 = GUICreate("Form1", 239, 106, 196, 124)
$Label1 = GUICtrlCreateLabel("Right click here.", 62, 32, 81, 17)
$menu=GUICtrlCreateContextMenu($Label1)
GUICtrlCreateMenuItem("Hello",$menu)
GUICtrlCreateMenuItem("Bye",$menu)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Label1
    EndSwitch
WEnd
Thank you. Works great.

[center]See the Helpfile[/center]

While Alive()
	 DrinkWine();
}
[center][/center]
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...