Jump to content
Sign in to follow this  
FireLord

How do I create a dialog?

Recommended Posts

FireLord

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]

Share this post


Link to post
Share on other sites
FireLord

GUICtrlCreateContextMenu

nothing happens?


[center]See the Helpfile[/center]
While Alive()
	 DrinkWine();
}
[center][/center]

Share this post


Link to post
Share on other sites
Nahuel

#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

Share this post


Link to post
Share on other sites
FireLord

#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]

Share this post


Link to post
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
Sign in to follow this  

×