Jump to content

shamike

Members
  • Posts

    3
  • Joined

  • Last visited

shamike's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. here how to make button change colour button,backgorund,hide button and disable button here the example #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global Const $AC_SRC_ALPHA = 1 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate(-1, 330, 323, 0, 0,$WS_Popup) GUISetFont(10, 800, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("Green", 8, 8, 153, 49) GUICtrlSetBkColor(-1, 0x00FF00) $Button2 = GUICtrlCreateButton("Red", 8, 64, 153, 49) GUICtrlSetBkColor(-1, 0xFF0000) $Button3 = GUICtrlCreateButton("Blue", 168, 8, 153, 49) GUICtrlSetBkColor(-1, 0x0000FF) $Button4 = GUICtrlCreateButton("Yellow", 168, 64, 153, 49) GUICtrlSetBkColor(-1, 0xFFFF00) $Button5 = GUICtrlCreateButton("Purple", 8, 120, 153, 49) GUICtrlSetBkColor(-1, 0xFF00FF) $Button6 = GUICtrlCreateButton("Aqua", 168, 120, 153, 49) GUICtrlSetBkColor(-1, 0x00FFFF) $Button7 = GUICtrlCreateButton("Exit", 8, 169, 313, 50) $Button8 = GUICtrlCreateButton("Show", 8, 219, 153, 50) $Button9 = GUICtrlCreateButton("Hide", 168, 219, 153, 50) $Button10 = GUICtrlCreateButton("Enable", 8, 269, 153, 50) $Button11 = GUICtrlCreateButton("Disable", 168, 269, 153, 50) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Form1 Case $Form1 Case $Form1 Case $Form1 Case $Button1 GUISetBkColor(0x00FF00);Set $form1 background colour GUICtrlSetBkColor($Button7,0x00FF00);Set button colour Case $Button2 GUISetBkColor(0xFF0000) GUICtrlSetBkColor($Button7,0xFF0000) Case $Button3 GUISetBkColor(0x0000FF) GUICtrlSetBkColor($Button7,0x0000FF) Case $Button4 GUISetBkColor(0xFFFF00) GUICtrlSetBkColor($Button7,0xFFFF00) Case $Button5 GUISetBkColor(0xFF00FF) GUICtrlSetBkColor($Button7,0xFF00FF) Case $Button6 GUISetBkColor(0x00FFFF) GUICtrlSetBkColor($Button7,0x00FFFF) Case $Button7 Exit Case $Button8 GUICtrlSetState($Button7,$GUI_SHOW);Show button Case $Button9 GUICtrlSetState($Button7,$GUI_Hide);Hide button Case $Button10 GUICtrlSetState($Button7,$GUI_ENABLE);Enable button Case $Button11 GUICtrlSetState($Button7,$GUI_DISABLE);Disable button EndSwitch WEnd to change the background background you need to use this code GUISetBkColor() to change the button colour you need GUICtrlSetBkColor($Button7,0x00FFFF) for show and hide button GUICtrlSetState(Control id,$GUI_SHOW);Show button GUICtrlSetState(Control id,$GUI_HIDE);Hide button for enable and disable button you need GUICtrlSetState(Control id,$GUI_ENABLE);Enable button GUICtrlSetState(Control id,$GUI_DISABLE);Disable button
  2. here you just need to reposition the label and button#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <EzSkin.au3> $EzGUI = EzSkinGUICreate("MyEzSkinDemo",280, 270) ;$Form1 = GUICreate("Form1", 280, 270, 192, 114) $EzIcon = EzSkinIcon($EzGUI) $Label1 = GUICtrlCreateLabel("IFIX geeft aan", 8, 15, 74, 25) $Label2 = GUICtrlCreateLabel("IFIX moet zijn", 8, 45, 74, 25) $Label3 = GUICtrlCreateLabel("Het verschil is", 8, 75, 74, 25) $Label4 = GUICtrlCreateLabel("EGU HIGH", 8, 105, 74, 25) $Label5 = GUICtrlCreateLabel("EGU LOW", 8, 135, 74, 25) $Label6 = GUICtrlCreateLabel("EGU HIGH", 8, 165, 74, 25) $Label7 = GUICtrlCreateLabel("EGU LOW", 8, 195, 74, 25) $Input1 = GUICtrlCreateInput("", 120, 20, 145, 21) $Input2 = GUICtrlCreateInput("", 120, 50, 145, 21) $Input3 = GUICtrlCreateInput("", 120, 80, 145, 21) $Input4 = GUICtrlCreateInput("3276.70", 120, 110, 145, 21) $Input5 = GUICtrlCreateInput("-3276.70", 120, 140, 145, 21) $Input6 = GUICtrlCreateInput("", 120, 170, 145, 21) $Input7 = GUICtrlCreateInput("", 120, 200, 145, 21) ;$Button1 = GUICtrlCreateButton("Cancel", 24, 230, 97, 25, $WS_GROUP) ;$Button2 = GUICtrlCreateButton("Generate", 147, 230, 97, 25, $WS_GROUP) $Button1 = EzSkinButton("Cancel", 24, 230, 97, 25,$WS_GROUP) ;, $font_color) $Button2 = EzSkinButton("Generate", 147, 230, 97, 25,$WS_GROUP) ;, $font_color) GUISetState(@SW_SHOW) While 1 EzSkinOver() $nMsg = GUIGetMsg() If $nMsg = $EzIcon[1] Then Exit If $nMsg = $EzIcon[2] Then GuiSetstate(@SW_MINIMIZE, $EzGUI) Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button2 GUICtrlSetData($Input3, GUICtrlRead($Input1) - GUICtrlRead($Input2)) GUICtrlSetData($Input6, GUICtrlRead($Input4) + GUICtrlRead($Input3)) GUICtrlSetData($Input7, GUICtrlRead($Input5) + GUICtrlRead($Input3)) EndSwitch WEnd
×
×
  • Create New...