Morel Posted November 13, 2006 Share Posted November 13, 2006 How Can i Add The MenuItem Icon From Shell32.dll Thankx Morel Link to comment Share on other sites More sharing options...
Bert Posted November 13, 2006 Share Posted November 13, 2006 From the helpfile: TraySetIconLoads/Sets a specified tray icon.TraySetIcon ( [iconfile [, iconID] )Parametersfilename [optional] The filename of the icon to be display in the tray. iconID [optional] Icon identifier if the file contain multiple icons. Return ValueSuccess: Returns 1. Failure: Returns 0. RemarksTo reset the icon to the default, use the function with no parameters:TraySetIcon().RelatedTraySetPauseIcon Example#Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown. $exititem = TrayCreateItem("Exit") TraySetState() $start = 0 While 1 $msg = TrayGetMsg() If $msg = $exititem Then ExitLoop $diff = TimerDiff($start) If $diff > 1000 Then TraySetIcon("Shell32.dll",Random(0,100,1)) $start = TimerInit() EndIF WEnd ExitWhen using shell32.dll, you have to tell TraySetIcon which icon you want to use. The above example uses the random command inside the trayseticon command to randomize what icon shows up. If you want to use a specific icon, do the command like this: TraySetIcon("Shell32.dll", 2), which "2" would be the second icon in the collection. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Morel Posted November 13, 2006 Author Share Posted November 13, 2006 Thanks But i ment the "File Edit View" Menu i Know that there is way to add an Icon to the Menu Item Morel Link to comment Share on other sites More sharing options...
Bert Posted November 13, 2006 Share Posted November 13, 2006 How Can i Add The MenuItem Icon From Shell32.dll ThankxMorelAhhh, now I understand. (I think) You want a icon for each menu item on the traymenu. Am I right? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Helge Posted November 13, 2006 Share Posted November 13, 2006 Maybe something like this ? 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