FinalVersion Posted February 13, 2010 Posted February 13, 2010 (edited) Is it possible to make these combo boxes look better? And can I align the text to the center? Edited February 13, 2010 by FinalVersion [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
Moderators Melba23 Posted February 13, 2010 Moderators Posted February 13, 2010 FinalVersion, Please post the code that produced them and we can take a look. 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
FinalVersion Posted February 13, 2010 Author Posted February 13, 2010 And by look better, I'm mean look more like Steam combo boxes. expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $frmMain = GUICreate("frmMain", 274, 173, -1, -1, BitOR($WS_SYSMENU,$WS_POPUP,$WS_CLIPSIBLINGS)) $lblCaption = GUICtrlCreateLabel("Counter-Strike:Source Launcher", 8, 8, 188, 20) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $cHeapsize = GUICtrlCreateCombo("cHeapsize", 96, 40, 145, 25) $lblHeapsize = GUICtrlCreateLabel("Heapsize:", 16, 40, 51, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $lbldxlevel = GUICtrlCreateLabel("Direct X Level", 16, 72, 69, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $cDxlevel = GUICtrlCreateCombo("cDxlevel", 96, 72, 145, 25) $lblWindowed = GUICtrlCreateLabel("Windowed", 16, 104, 54, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $chkWindowed = GUICtrlCreateCheckbox("", 104, 104, 17, 17) $btnClose = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\close_button.bmp", 256, 8, 11, 11, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $btnMinimize = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\minimize_button.bmp", 240, 13, 13, 6, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $btnLaunch = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\launch_button.bmp", 80, 136, 76, 24, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $btnSave = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\save_button.bmp", 168, 136, 76, 24, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) GUISetBkColor(0x5a6a50) GUICtrlSetBkColor($cHeapsize, 0x5a6a50) GUICtrlSetBkColor($cDxlevel, 0x5a6a50) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $btnClose Exit Case $btnMinimize GUISetState(@SW_MINIMIZE) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
FinalVersion Posted February 13, 2010 Author Posted February 13, 2010 Here is an example of the combo boxes I want. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
Info Posted February 13, 2010 Posted February 13, 2010 #include <WindowsConstants.au3> #include <ComboConstants.au3> $Form1 = GUICreate("Form1", 122, 133, -1, -1, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS)) $Combo1 = GUICtrlCreateCombo("", 8, 8, 105, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) $Combo2 = GUICtrlCreateCombo("", 8, 32, 105, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) $Combo3 = GUICtrlCreateCombo("", 8, 56, 105, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) $Label1 = GUICtrlCreateLabel("Normal text", 8, 88, 57, 17) $Label2 = GUICtrlCreateLabel("Special text", 8, 112, 59, 17) GUISetBkColor(0x4C5844) GUICtrlSetData($Combo1,"1|2|3","2") GUICtrlSetData($Combo2,"1|2|3","2") GUICtrlSetData($Combo3,"1|2|3","2") GUICtrlSetBkColor($Combo1,0x3E4637) GUICtrlSetBkColor($Combo2,0x3E4637) GUICtrlSetBkColor($Combo3,0x3E4637) GUICtrlSetColor($Combo1,0xD8DED3) GUICtrlSetColor($Combo2,0xD8DED3) GUICtrlSetColor($Combo3,0xD8DED3) GUICtrlSetColor($Label1,0xA0AA95) GUICtrlSetColor($Label2,0xC4B550) GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then Exit WEnd This is the best I could achieve
FinalVersion Posted February 13, 2010 Author Posted February 13, 2010 That's better, still don't want the "Windows" look. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
Moderators Melba23 Posted February 13, 2010 Moderators Posted February 13, 2010 FinalVersion,Pardon the question, but before we start - can you assure me that this does not fall under the "no bot" rule? I only ask because as a non-gamer, my antennae quiver whenever I see things like "Counter-Strike:Source Launcher". 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
FinalVersion Posted February 13, 2010 Author Posted February 13, 2010 Yeah, the launcher is just for parameters, like Resolution etc. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
Info Posted February 13, 2010 Posted February 13, 2010 #include <WindowsConstants.au3> #include <ComboConstants.au3> $Form1 = GUICreate("Form1", 300, 400, -1, -1, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) ;frame: GUICtrlCreatePic("frame1.bmp",0,0,300,2) GUICtrlCreatePic("frame2.bmp",298,0,2,400) GUICtrlCreatePic("frame3.bmp",0,398,300,2) GUICtrlCreatePic("frame4.bmp",0,0,2,400) ; $Combo1 = GUICtrlCreateCombo("", 8, 8, 105, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) $Combo2 = GUICtrlCreateCombo("", 8, 32, 105, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) $Combo3 = GUICtrlCreateCombo("", 8, 56, 105, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) $Label1 = GUICtrlCreateLabel("Normal text", 8, 88, 57, 17) $Label2 = GUICtrlCreateLabel("Special text", 8, 112, 59, 17) GUISetBkColor(0x4C5844) GUICtrlSetData($Combo1,"1|2|3","2") GUICtrlSetData($Combo2,"1|2|3","2") GUICtrlSetData($Combo3,"1|2|3","2") GUICtrlSetBkColor($Combo1,0x3E4637) GUICtrlSetBkColor($Combo2,0x3E4637) GUICtrlSetBkColor($Combo3,0x3E4637) GUICtrlSetColor($Combo1,0xD8DED3) GUICtrlSetColor($Combo2,0xD8DED3) GUICtrlSetColor($Combo3,0xD8DED3) GUICtrlSetColor($Label1,0xA0AA95) GUICtrlSetColor($Label2,0xC4B550) GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then Exit WEndframes.rar
Moderators Melba23 Posted February 13, 2010 Moderators Posted February 13, 2010 Finalversion,Apologies for asking - no offence meant. Here are some slightly better combos - I have removed the default theme from the upper combo which enables us to colour it a bit better. You should be able to see how it was done and apply it to the other yourself:expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $frmMain = GUICreate("frmMain", 274, 173, -1, -1, BitOR($WS_SYSMENU,$WS_POPUP,$WS_CLIPSIBLINGS)) GUISetBkColor(0x5a6a50) $lblCaption = GUICtrlCreateLabel("Counter-Strike:Source Launcher", 8, 8, 188, 20) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $cHeapsize = GUICtrlCreateCombo("cHeapsize", 96, 40, 145, 25) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($cHeapsize), "wstr", 0, "wstr", 0) GUICtrlSetColor($cHeapsize, 0x00ff00) GUICtrlSetBkColor($cHeapsize, 0x5a6a50) $lblHeapsize = GUICtrlCreateLabel("Heapsize:", 16, 40, 51, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $lbldxlevel = GUICtrlCreateLabel("Direct X Level", 16, 72, 69, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $cDxlevel = GUICtrlCreateCombo("cDxlevel", 96, 72, 145, 25) GUICtrlSetBkColor($cDxlevel, 0x5a6a50) $lblWindowed = GUICtrlCreateLabel("Windowed", 16, 104, 54, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $chkWindowed = GUICtrlCreateCheckbox("", 104, 104, 17, 17) $btnClose = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\close_button.bmp", 256, 8, 11, 11, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $btnMinimize = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\minimize_button.bmp", 240, 13, 13, 6, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $btnLaunch = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\launch_button.bmp", 80, 136, 76, 24, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $btnSave = GUICtrlCreatePic("C:\Users\Scott\Programming\AutoIt\CSS Launcher\Images\save_button.bmp", 168, 136, 76, 24, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg ;Case $btnClose ; Exit ;Case $btnMinimize ; GUISetState(@SW_MINIMIZE) Case $GUI_EVENT_CLOSE Exit EndSwitch WEndWhat is left is the 3-D border. These colours can be set globally by using the _WinAPI_Get/SetSysColor commands - I would imagine you need these parameters:$COLOR_3DHIGHLIGHT - Highlight color for three-dimensional display elements (for edges facing the light source.)$COLOR_3DHILIGHT - Highlight color for three-dimensional display elements (for edges facing the light source.)$COLOR_3DLIGHT - Light color for three-dimensional display elements (for edges facing the light source.)$COLOR_3DSHADOW - Shadow color for three-dimensional display elements (for edges facing away from the light source).But bear in mind that these affect ALL 3-D objects on your system, not just the current GUI - mess with them at your peril. So as not to frighten you off completely, I have always found that the default system colours are reset when you reboot - it got me quite concerned the first time I tried to change anything!I hope this helps a bit. 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
FinalVersion Posted February 13, 2010 Author Posted February 13, 2010 (edited) Thanks, but I'm not that worried about minor details. Here is what I have so far.Edit:@M23Where getting somewhere Edit2:I was thinking maybe of having a look at some steam resources(Dll's etc). Edited February 13, 2010 by FinalVersion [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
Moderators Melba23 Posted February 13, 2010 Moderators Posted February 13, 2010 FinalVersion, I am pretty sure that the combos you want to emulate are custom-drawn controls - which requires a great deal of GDI to emulate. I imagine it might be possible in AutoIt, but it is certainly well beyond my capability. In any event I would hazard a guess that the code overhead for something as complicated as an ower-drawn combobox would be prohibitive. Good luck with the searching - let us know if you find anything. 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
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