au3scr Posted November 10, 2007 Share Posted November 10, 2007 how i make button with picture? Link to comment Share on other sites More sharing options...
martin Posted November 10, 2007 Share Posted November 10, 2007 how i make button with picture?If you want to have a button with a picture on it you can useGUICtrlSetImage - see the help. 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...
au3scr Posted November 10, 2007 Author Share Posted November 10, 2007 itd for dll but if i want use my self made picture? Link to comment Share on other sites More sharing options...
toothyXdip Posted November 10, 2007 Share Posted November 10, 2007 Here is your answer ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝ Link to comment Share on other sites More sharing options...
Madza91 Posted November 10, 2007 Share Posted November 10, 2007 Something like this: expandcollapse popup#include <GUIConstants.au3> $GUI = GUICreate("My GUI") $ic = GUICtrlCreatePic("1.jpg",0,0,100,23) GUICtrlSetState(-1, $GUI_DISABLE) $b = GUICtrlCreatePic("2.jpg",0,0,100,23) GUICtrlSetState(-1,$GUI_HIDE) $2 = GUICtrlCreatePic("3.jpg",0,0,100,23) GUICtrlSetState(-1,$GUI_HIDE) GUISetState() While 1 $m = GUIGetMsg() If $m = -3 then Exit $c = GUIGetCursorInfo($GUI) If $c[4] = $ic Then GUICtrlSetState( $b, $GUI_SHOW) GUICtrlSetState( $ic, $GUI_HIDE) ;Sleep(100) $c = GUIGetCursorInfo($GUI) While $c[4] = $b If GUIGetMsg() = $b Then Do_Function() $c = GUIGetCursorInfo($GUI) WEnd GUICtrlSetState( $2, $GUI_HIDE) GUICtrlSetState( $b, $GUI_HIDE) GUICtrlSetState( $ic, $GUI_SHOW) EndIf WEnd Func Do_Function() GUICtrlSetState( $2, $GUI_SHOW) MsgBox(0x0, "tset", "OK..... ", 3) EndFunc [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
martin Posted November 10, 2007 Share Posted November 10, 2007 itd for dll but if i want use my self made picture?No, the help does show with a dll but it can be used with a bmp like thisGuictrlcreateButton('',10,10,100,100)guictrsetimage(-1,"mypic.bmp",0)but I don't think it will work with jpg or png. 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...
au3scr Posted November 11, 2007 Author Share Posted November 11, 2007 tnx..does anyone know where i can get icons for undo buttons,save buttons, new buttons Link to comment Share on other sites More sharing options...
au3scr Posted November 11, 2007 Author Share Posted November 11, 2007 I got other problem $undobutton = GuiCtrlCreateButton("Undo", 0, 0, 40, 20,$BS_ICON) GUICtrlSetImage (-1, "undo.bmp") nothing appears on my button.. bmp and script both ate in same directory Link to comment Share on other sites More sharing options...
au3scr Posted November 11, 2007 Author Share Posted November 11, 2007 ok i got it but it makes my picture larger than it is actually Can anyone help? Link to comment Share on other sites More sharing options...
Madza91 Posted November 11, 2007 Share Posted November 11, 2007 $undobutton = GuiCtrlCreateButton("Undo", 0, 0, 40, 20,$BS_ICON) GUICtrlSetImage (-1, "undo.bmp",0) That works for me [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) 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