This code is taken from the help file to show my question #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> Example1() ; **************** ; * First sample * ; **************** Func Example1() ;right click on gui to bring up context Menu. ;right click on the "ok" button to bring up a controll specific context menu. GUICreate("My GUI Context Menu", 300, 200) Local $contextmenu = GUICtrlCreateContextMenu() Local $button = GUICtrlCreateButton("OK", 100, 100, 70, 20) L