muhmuuh Posted September 28, 2008 Share Posted September 28, 2008 Hi! I want to create a floating icon for my program. Basically it will be a very small gui with just one picture in it that is always on top. I would be something like FlashGet's green icon if you know what I mean. So far so good but... I want to create a menu that will appear when I click the icon. I want to create a menu similar to the one that appears when I create a traymenu but that will appear when I click the icon. I can see when the icon is clicked by GUICtrlSetOnEvent but how can I create a menu similar to the tray menu? Please give me a hint where I should look Thanks I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more. Link to comment Share on other sites More sharing options...
BrettF Posted September 28, 2008 Share Posted September 28, 2008 This sounds like fun... Let me whip one up Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 28, 2008 Share Posted September 28, 2008 Context Menus + helpfile = results. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
BrettF Posted September 28, 2008 Share Posted September 28, 2008 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> $icon = "Limewire.jpg" $smallGUI = GUICreate("SmallOnTopWindowThingo", 100, 100, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST)) $icon = GUICtrlCreatePic($icon, 0, 0, 100, 100, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) $menu = GUICtrlCreateContextMenu($icon) $func1 = GUICtrlCreateMenuItem ("Function 1", $icon) $func2 = GUICtrlCreateMenuItem ("Exit", $icon) GUISetState() While 1 $nMsg = GUIGetMsg () Switch $nMsg Case -3 Exit Case $func1 MsgBox (0,"", "Func 1!") Case $func2 MsgBox (0,"", "Func 2! Will now exit!") EndSwitch WEndThis was my picture. Bad transparency, but it works for the example Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
muhmuuh Posted September 28, 2008 Author Share Posted September 28, 2008 ...Thanks alotGUICtrlCreateMenuItem - how did I miss it? I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more. Link to comment Share on other sites More sharing options...
Nahuel Posted September 29, 2008 Share Posted September 29, 2008 Brett's example is very good! To get a smoother transparency, use bmp files. You can also use Png images but it'll be a bit complicated to create a context menu. 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