CodyBarrett Posted March 29, 2009 Share Posted March 29, 2009 ok so ive been tinkering with .dlls just lately and im wondering why doesnt this work #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Bob Script Function: Keeps A Secure Folder #ce ---------------------------------------------------------------------------- #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <EditConstants.au3> #include <ButtonConstants.au3> #include <Misc.au3> #Include <GuiEdit.au3> Opt ('GuiOnEventMode', 1) Opt ('MustDeclareVars', 1) Global $GUI = GUICreate ('LOCKER', 400, 200, -1, -1, -2139094904) GUISetBkColor (0x000000, $GUI) GUISetFont (20, '', '', 'Courier New', $GUI) Global $STATUSLABEL = GUICtrlCreateLabel ('LOCKER STATUS = ', 10, 10, 300, 50) Global $STATUSICON = GUICtrlCreateIcon (@SystemDir & '\Shell32.dll', 364, 300, 10, 30, 30) GUICtrlSetColor ($STATUSLABEL, 0xFFFFFF) GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit') GUISetState () While 1 WEnd Func _Exit () Exit EndFunc [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2009 Moderators Share Posted March 29, 2009 CodyBarrett,Firstly, my Shell32.dll only has 277 icons! (Vista x32 Home Prem)Secondly, I believe you need a negative ordinal. From the Help file: "Passing a positive number will reference the string equivalent icon name. Passing a negative number causes 1-based "index" behaviour. Some Dll can have icon extracted just with negative numbers".Using your code with -48 gives me a "padlock" icon - which I assume is what you wantedGlobal $STATUSICON = GUICtrlCreateIcon (@SystemDir & '\Shell32.dll', -48, 300, 10, 30, 30)M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 awe thank you... so how do i figure out the numeral value for the icon.. i was using reshacker and i that it wasnt right... [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Authenticity Posted March 29, 2009 Share Posted March 29, 2009 Look under the "Icon Group" expanded tree, not "Icon". Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 (edited) ahhh thank you! EDIT ok now i have this and the button wont click expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Bob Script Function: Keeps A Secure Folder #ce ---------------------------------------------------------------------------- #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <EditConstants.au3> #include <ButtonConstants.au3> #include <Misc.au3> #Include <GuiEdit.au3> #include <StaticConstants.au3> Opt ('GuiOnEventMode', 1) Opt ('MustDeclareVars', 1) Global $GUI = GUICreate ('LOCKER', 400, 200, -1, -1, -2139094904) GUISetBkColor (0x000000, $GUI) GUISetFont (20, '', '', 'Courier New', $GUI) Global $STATUSLABEL = GUICtrlCreateLabel ('LOCKER STATUS = ', 10, 10, 300, 50) Dim $STATUSICON = GUICtrlCreateButton ('', 270,10, 40, 40, $BS_ICON) GUICtrlSetImage ($STATUSICON,'Shell32.dll', -48) GUICtrlSetColor ($STATUSLABEL, 0xFFFFFF) GUICtrlSetOnEvent ($STATUSICON, 'Setattrib') GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit') GUISetState () While 1 Sleep (100) WEnd Func Setattrib () GUICtrlSetImage ($STATUSICON, 'Shell32.dll', -45) EndFunc Func _Exit () Exit EndFunc Edited March 29, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
martin Posted March 29, 2009 Share Posted March 29, 2009 ahhh thank you! EDIT ok now i have this and the button wont click expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Bob Script Function: Keeps A Secure Folder #ce ---------------------------------------------------------------------------- #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <EditConstants.au3> #include <ButtonConstants.au3> #include <Misc.au3> #Include <GuiEdit.au3> #include <StaticConstants.au3> Opt ('GuiOnEventMode', 1) Opt ('MustDeclareVars', 1) Global $GUI = GUICreate ('LOCKER', 400, 200, -1, -1, -2139094904) GUISetBkColor (0x000000, $GUI) GUISetFont (20, '', '', 'Courier New', $GUI) Global $STATUSLABEL = GUICtrlCreateLabel ('LOCKER STATUS = ', 10, 10, 300, 50) Dim $STATUSICON = GUICtrlCreateButton ('', 270,10, 40, 40, $BS_ICON) GUICtrlSetImage ($STATUSICON,'Shell32.dll', -48) GUICtrlSetColor ($STATUSLABEL, 0xFFFFFF) GUICtrlSetOnEvent ($STATUSICON, 'Setattrib') GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit') GUISetState () While 1 Sleep (100) WEnd Func Setattrib () GUICtrlSetImage ($STATUSICON, 'Shell32.dll', -45) EndFunc Func _Exit () Exit EndFunc Your label overlaps the button, so reduce it to say 260 wide. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 OH! is that it? [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] 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