FireLord Posted November 17, 2007 Share Posted November 17, 2007 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 More sharing options...
enaiman Posted November 17, 2007 Share Posted November 17, 2007 GUICtrlCreateContextMenu SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
FireLord Posted November 17, 2007 Author Share Posted November 17, 2007 GUICtrlCreateContextMenunothing happens? [center]See the Helpfile[/center] While Alive() DrinkWine(); }[center][/center] Link to comment Share on other sites More sharing options...
Nahuel Posted November 17, 2007 Share Posted November 17, 2007 #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 More sharing options...
FireLord Posted November 17, 2007 Author Share Posted November 17, 2007 #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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now