Jump to content

How to apply icons from shell32.dll


 Share

Recommended Posts

I'm trying to add icons to my buttons that are located in shell32.dll. in the file Enumicons.au3 (In the GUI examples) it is number 137. So i tried GUICtrlSetImage($button1, "shell32.dll 137") but it didn't work. Can anyone help me?

NEVERMIND. FOUND CODE

But code doesen't work :whistle:

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 1013, 696, 2, 3)
$Group1 = GUICtrlCreateGroup("AGroup1", 0, 32, 1009, 657)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Input1 = GUICtrlCreateInput("http:\\", 0, 8, 465, 21, -1, $WS_EX_CLIENTEDGE)
$Button1 = GUICtrlCreateButton("AButton1", 472, 0, 49, 33)
GUICtrlSetImage(-1, @SystemDir & "\Shell32.dll", 137)
$Button2 = GUICtrlCreateButton("AButton1", 536, 0, 49, 33)
$Button3 = GUICtrlCreateButton("AButton1", 600, 0, 49, 33)
$Button4 = GUICtrlCreateButton("AButton1", 664, 0, 49, 33)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;;;;;
    EndSelect
WEnd
Exit
Edited by codemyster
Link to comment
Share on other sites

Hm... i have this topic so i might as well use it for another question:

I get an error on this, "Variable must be of type "Object""

#include <GUIConstants.au3>
#include <IE.au3>
#Include <GUIStatusBar.au3>
$oIE = _IECreateEmbedded()
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 1013, 696, 2, 3)
$Group1 = GUICtrlCreateObj($oIE, 5, 32, 1000, 650)
$Input1 = GUICtrlCreateInput("http:\\", 0, 8, 465, 21, -1, $WS_EX_CLIENTEDGE)
$Button1 = GUICtrlCreateButton("AButton1", 472, 3, 52, 33, $BS_ICON)
GUICtrlSetImage(-1, @SystemDir & "\Shell32.dll", 137)
$Button2 = GUICtrlCreateButton("AButton1", 536, 0, 49, 33, $BS_ICON)
GUICtrlSetImage(-1, @SystemDir & "\Shell32.dll", 131)
$Button3 = GUICtrlCreateButton("AButton1", 600, 0, 49, 33, $BS_ICON)
GUICtrlSetImage(-1, @SystemDir & "\Shell32.dll", 146)
$Button4 = GUICtrlCreateButton("AButton1", 664, 0, 49, 33, $BS_ICON)
GUICtrlSetImage(-1, @SystemDir & "\Shell32.dll", 176)
GUISetState(@SW_SHOW)
$bar = _GuiCtrlStatusBarCreate($Form1, 50, "")
While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $oIE.top.document.ready.state = "complete";;line with error
        _GuiCtrlStatusBarSetText($bar, "done")
    Case $msg = $Button1
        _IENavigate($oIE, GUICtrlRead($Input1))
    EndSelect
WEnd
Exit

The variable is an object...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...