Search the Community
Showing results for tags 'guictrlcreatebutton'.
-
This is a little tool that displays the contents of a DLL icon file. It shows how to use icons on buttons and as stand alone images. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 Author: Skysnake Script Function: Display content of DLL icon files #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> ;Local $rDLLpath = @SystemDir & "\Wmploc.dll" ;Local $rDLLpath = @SystemDir & "\imageres.dll" ;Local $rDLLpath = @SystemDir & "\shell32.dll" ;Local $rDLLpath = @SystemDir & "\pifmgr.dll" ;Local $rDLLpath = @SystemDir & "\explorer.exe" ;Local $rDLLpath = @SystemDir & "\accessibilitycpl.dll" ;Local $rDLLpath = @SystemDir & "\ddores.dll" ;Local $rDLLpath = @SystemDir & "\moricons.dll" ; ugly do not use ;Local $rDLLpath = @SystemDir & "\mmcndmgr.dll ;Local $rDLLpath = @SystemDir & "\netshell.dll" ;Local $rDLLpath = @SystemDir & "\ieframe.dll" Local $rDLLpath = @SystemDir & "\wiashext.dll" For $r = 0 To -50 Step -10 ConsoleWrite($r & @CRLF) GUICreate("Show Icons") Local $lblShowRange = GUICtrlCreateLabel("Icons " & $r - 1 & " to " & $r - 10, 8, 8, 100, 25) Local $btnIcon1 = GUICtrlCreateButton("", 8, 25, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon1, $rDLLpath, $r - 1, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 1, 40, 25, 24, 24) ; 2nd Local $btnIcon2 = GUICtrlCreateButton("", 8, 50, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon2, $rDLLpath, $r - 2, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 2, 40, 50, 24, 24) ; 3rd Local $btnIcon3 = GUICtrlCreateButton("", 8, 75, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon3, $rDLLpath, $r - 3, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 3, 40, 75, 24, 24) ;4th Local $btnIcon4 = GUICtrlCreateButton("", 8, 100, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon4, $rDLLpath, $r - 4, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 4, 40, 100, 24, 24) ;5th Local $btnIcon5 = GUICtrlCreateButton("", 8, 125, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon5, $rDLLpath, $r - 5, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 5, 40, 125, 24, 24) ;6th Local $btnIcon6 = GUICtrlCreateButton("", 8, 150, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon6, $rDLLpath, $r - 6, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 6, 40, 150, 24, 24) ;7th Local $btnIcon7 = GUICtrlCreateButton("", 8, 175, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon7, $rDLLpath, $r - 7, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 7, 40, 175, 24, 24) ;8th Local $btnIcon8 = GUICtrlCreateButton("", 8, 200, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon8, $rDLLpath, $r - 8, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 8, 40, 200, 24, 24) ;9th Local $btnIcon9 = GUICtrlCreateButton("", 8, 225, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon9, $rDLLpath, $r - 9, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 9, 40, 225, 24, 24) ;10th Local $btnIcon10 = GUICtrlCreateButton("", 8, 250, 24, 24, $BS_ICON) GUICtrlSetImage($btnIcon10, $rDLLpath, $r - 10, 0) ; GUICtrlCreateIcon($rDLLpath, $r - 10, 40, 250, 24, 24) ; Display the GUI. GUISetState(@SW_SHOW) Sleep(3000) GUIDelete() Next
-
- guictrlcreateicon
- $bs_icon
-
(and 1 more)
Tagged with:
-
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("MyCommands", 406, 236, 610, 129) $Main = GUICtrlCreateTab(8, 8, 385, 217) $TabSheet1 = GUICtrlCreateTabItem("Main") $StopFunc = GUICtrlCreateButton("STOP", 17, 43, 150, 50) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $StartFunc = GUICtrlCreateButton("Start", 17, 98, 150, 50) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Input0 = GUICtrlCreateInput("Input0", 267, 43, 75, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Input1 = GUICtrlCreateInput("Input1"", 267, 73, 75, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Input2 = GUICtrlCreateInput("Input2", 267, 103, 75, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Input3 = GUICtrlCreateInput("Input3", 267, 133, 75, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Input4 = GUICtrlCreateInput("Input4", 267, 163, 75, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Input5 = GUICtrlCreateInput("Input5", 267, 195, 75, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Label1 = GUICtrlCreateLabel("Label1", 215, 43, 50, 20, $SS_RIGHT) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Label2", 215, 73, 50, 20, $SS_RIGHT) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Label3 = GUICtrlCreateLabel("Label3", 215, 103, 50, 20, $SS_RIGHT) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Label4 = GUICtrlCreateLabel("Label4", 215, 133, 50, 20, $SS_RIGHT) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Label5 = GUICtrlCreateLabel("Label5", 215, 163, 50, 20, $SS_RIGHT) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Label6 = GUICtrlCreateLabel("Label6", 191, 195, 74, 20, $SS_RIGHT) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $TabSheet2 = GUICtrlCreateTabItem("Individuals") $Button1 = GUICtrlCreateButton("Button1", 17, 43, 75, 25) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $StartBOT letsdothis() Case $StopBOT END_This() EndSwitch WEnd func letsdothis() While 1 ;doing stuff ;doing more stuff if $StopFunc Then END_This() ;how do i detect if the button has been pressed if $Button1 Then Sleepy_Time() ;doing things ;doing more things WEnd EndFunc Func Sleepy_Time() while 1 sleep(10) if $Button1 Then ExitLoop ; detect button press and return to previous state Wend EndFunc Func END_This() Exit EndFunc For the LIFE of me I can't figure out, HOW ON EARTH to detect that a button has been pressed while a function is running? Can someone PLEASE point me in the right direction??? Thanks
-
;Adding $BS_DEFPUSHBUTTON doesn't work $idCopy_Data = GUICtrlCreateButton("Copy Data Only", $iButtonWidth_2, $aiGUISize[1] - $iButtonMargin, $iButtonWidth_2, 20, $BS_DEFPUSHBUTTON) ;Adding these two lines doesn't work either Local $aAccelKeys[2][2] = [["{enter}", $idCopy_Data], ["^{enter}", $idCopy_ID]] GUISetAccelerators($aAccelKeys)
-
Hi need some help with the space between two buttons, if I ran the script the space between two buttons is gone and when I maximized the gui, space between two button is showing, #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $hGUI1 = GUICreate("Test", 1090, 800, 200, 200, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP, $WS_HSCROLL, $WS_VSCROLL)) $TopRight1 = GUICtrlCreateButton("Test1", 800, 25, 70, 50) $TopRight2 = GUICtrlCreateButton("Test2", 850, 25, 70, 50) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd this is the first time I encounter this problem.
-
Hi friends, I need help with the process, I have a button to initiate a code but do not know how to configure it to be the button to start the process, thank you very much for your help. Here I leave the code to see if I have to change some part. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\juan.caballeron\desktop\ \programacion\autoit\capturas\koda_1.7.3.0\forms\grabar capturas.kxf $Form1_1 = GUICreate("WhiteSnake", 655, 487, 192, 124) GUISetIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\Avatar on ice-256.ico", -1) GUISetBkColor(0xC8C8C8) $hechos = GUICtrlCreateGroup("Hechos", 16, 32, 385, 169) GUICtrlSetColor(-1, 0x000000) $box_fechah = GUICtrlCreateInput("", 112, 72, 81, 21) GUICtrlSetLimit(-1, 10) $box_hora = GUICtrlCreateInput("", 112, 104, 81, 21) GUICtrlSetLimit(-1, 5) $box_fechaf = GUICtrlCreateInput("", 112, 136, 81, 21) GUICtrlSetLimit(-1, 10) $box_fte = GUICtrlCreateInput("", 112, 168, 81, 21) GUICtrlSetLimit(-1, 5) $Label3 = GUICtrlCreateLabel("Fecha Hecho:", 24, 72, 72, 17) $Label4 = GUICtrlCreateLabel("Hora:", 24, 104, 30, 17) $Label5 = GUICtrlCreateLabel("Fecha Fuente:", 24, 136, 73, 17) $Label6 = GUICtrlCreateLabel("Nro. Fuente:", 24, 168, 63, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $personas = GUICtrlCreateGroup("Datos de la Persona", 16, 224, 585, 185) $Label1 = GUICtrlCreateLabel("Tipo Identificación:", 32, 256, 94, 17) $Label2 = GUICtrlCreateLabel("No. Documento:", 32, 280, 82, 17) $Label7 = GUICtrlCreateLabel("Apellidos", 32, 304, 46, 17) $Label8 = GUICtrlCreateLabel("Nombres", 32, 328, 46, 17) $Label9 = GUICtrlCreateLabel("Sexo", 32, 352, 28, 17) $Label10 = GUICtrlCreateLabel("Fecha Nacimiento", 32, 376, 90, 17) $Combo1 = GUICtrlCreateCombo("Selección", 128, 256, 193, 21) $Combo1 = GUICtrlSetData(-1, "Tarjeta de Identidad|Cédula") GUICtrlSetLimit(-1, 1) $documento = GUICtrlCreateInput("", 128, 280, 193, 21) $apellidos = GUICtrlCreateInput("", 128, 304, 377, 21) $nombres = GUICtrlCreateInput("", 128, 328, 377, 21) $Combo2 = GUICtrlCreateCombo("Selección", 128, 352, 121, 21) $Combo2 = GUICtrlSetData(-1, "Masculino|Femenino") GUICtrlSetLimit(-1, 1) $fecha_naci = GUICtrlCreateInput("", 128, 376, 121, 21) GUICtrlSetLimit(-1, 10) GUICtrlCreateGroup("", -99, -99, 1, 1) $datoscap = GUICtrlCreateGroup("Datos Capturas", 456, 32, 145, 169) $Label11 = GUICtrlCreateLabel("Label11", 472, 56, 42, 17) $Label12 = GUICtrlCreateLabel("Label12", 472, 80, 42, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Titulo = GUICtrlCreateLabel("PROCESO PARA GRABAR CAPTURAS EN EL SIEDCO.", 175, 8, 277, 17, $SS_CENTER) GUICtrlSetCursor (-1, 3) $Progress1 = GUICtrlCreateProgress(448, 432, 169, 9) GUICtrlSetCursor (-1, 15) $creador = GUICtrlCreateLabel("By WhiteSnake", 8, 440, 78, 17) GUICtrlSetColor(-1, 0xFF0000) $Icon1 = GUICtrlCreateIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\1249549841170809086.ico", -1, 88, 432, 32, 32) $iniciar = GUICtrlCreateButton("INICIAR PROCESO", 296, 424, 145, 25) GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I just need to know how to do that when you click the $iniciar start any process.
-
I have created a Gui with a number of GUICtrlCreateButton() When I click on them with the mouse, the response by my script is very slow (1-2 secs), but if I navigate the buttons using the arrow keys and activate them with the Enter key, the response is fairly instant. Has anyone else seen this, and perhaps solved it? Dave
-
NO code, but a question...what is your method for adding a control in an already created GUI. Say you created your GUI, and then decided that there was something missing, and you wanted to put it in the middle or where ever...you have to move all the controls after it and it is a pain. Does anyone have an easy method, or the method you choose to begin with so you do not have to worry about this coming up in the future?
- 16 replies
-
- guicreate
- GUICtrlCreateButton
-
(and 1 more)
Tagged with:
-
I'm trying to make an up and down arrow like this " ^ ", but since there is no down caret on the keyboard I'm resorting to trying to figure out ways to get that Caret upside down. Has anyone tried doing this for a button so that it looks like an up and down array? This button will be used for sorting. I've tried looking through Unicode to see if I could do it and no luck :/. Any help would be much appreciated.