GraaF1337 Posted March 3, 2014 Posted March 3, 2014 (edited) Hello! I have this idea in my head where i want to create a awesome looking GUI but the 2 best ideas i have, seem to me to be impossible to create in autoit, or at least im unable to find anything about how to create them. I normally use KODA to make GUI's in, and it seems that you can't create what im looking for in there. But now to the point! I would like to create a circle GUI, where the GUI itself is a circle and with some text and maybe a inputbox inside it. Example (Created fast in paint) My other idea is a standard GUI but with Tabs as i would call them, im un sure what the "real" name of these "Tabs" are. Example (Created fast in paint) So if you have an idea how to create one of these im very interested in how to create them! Edited March 3, 2014 by GraaF1337
Moderators Melba23 Posted March 3, 2014 Moderators Posted March 3, 2014 GraaF1337,There are numerous examples of how to create "shaped" GUIs on the forum. As to the tabs - they are called (unsurprisingly) "Tabs" and a quick glance at the Help file will show you many functions that you can use to produce them - GUICtrlCreateTab would be a good place to start. 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
GraaF1337 Posted March 3, 2014 Author Posted March 3, 2014 GraaF1337, There are numerous examples of how to create "shaped" GUIs on the forum. As to the tabs - they are called (unsurprisingly) "Tabs" and a quick glance at the Help file will show you many functions that you can use to produce them - GUICtrlCreateTab would be a good place to start. M23 The only thread i could find about creating "shaped" GUI is rounded corners? And about the tabs thanks for your help, but is it possible to do in KODA or do you need to do it by hand?
FireFox Posted March 3, 2014 Posted March 3, 2014 You can create shaped GUI using a PNG and the transparent part of the PNG can be used as corners.
Moderators Melba23 Posted March 3, 2014 Moderators Posted March 3, 2014 GraaF1337,I have never used Koda, so I have no idea if you can add tabs when using it. But they are not difficult to code "by hand" - and you could always use Koda to arrange the controls for each tab separately and then combine the resulting code sections into a final script. 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
GraaF1337 Posted March 3, 2014 Author Posted March 3, 2014 You can create shaped GUI using a PNG and the transparent part of the PNG can be used as corners. Can you give me an example of that please? GraaF1337, I have never used Koda, so I have no idea if you can add tabs when using it. But they are not difficult to code "by hand" - and you could always use Koda to arrange the controls for each tab separately and then combine the resulting code sections into a final script. M23 Ohhh okay and thanks alot!
FireFox Posted March 3, 2014 Posted March 3, 2014 (edited) Can you give me an example of that please? expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <WinAPI.au3> #include <WinAPISys.au3> InetGet("http://i.imgur.com/RfLGeSn.png", "RfLGeSn.png") _GDIPlus_Startup() Local $hImage = _GDIPlus_ImageLoadFromFile("RfLGeSn.png") Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() FileDelete("RfLGeSn.png") Local $tSize = _WinAPI_GetBitmapDimension($hHBitmap) Local $iWidth = DllStructGetData($tSize, 1) Local $iHeight = DllStructGetData($tSize, 2) Local $hGUI = GUICreate("MyGUI", $iWidth, $iHeight, -1, -1, $WS_POPUP, $WS_EX_LAYERED) Local $aPos = WinGetPos($hGUI) Local $hLayGUI = GUICreate("", 70, 23, $aPos[0] + ($aPos[2] - 70) / 2, $aPos[1] + $aPos[3] - 50, $WS_POPUP, $WS_EX_LAYERED, $hGUI) GUISetBkColor(0x2B5280, $hLayGUI) Local $iButton1 = GUICtrlCreateButton("Button1", 0, 0, 70, 23) GUICtrlSetState($iButton1, $GUI_FOCUS) _WinAPI_SetLayeredWindowAttributes($hLayGUI, 0x2B5280, 0, $LWA_COLORKEY) _WinAPI_UpdateLayeredWindowEx($hGUI, -1, -1, $hHBitmap) GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $hLayGUI) Local $iMsg = 0 While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE, $iButton1 ExitLoop EndSwitch WEnd GUIDelete($hLayGUI) GUIDelete($hGUI) Edited March 3, 2014 by FireFox
GraaF1337 Posted March 3, 2014 Author Posted March 3, 2014 expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <WinAPI.au3> #include <WinAPISys.au3> InetGet("http://i.imgur.com/RfLGeSn.png", "RfLGeSn.png") _GDIPlus_Startup() Local $hImage = _GDIPlus_ImageLoadFromFile("RfLGeSn.png") Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() FileDelete("RfLGeSn.png") Local $tSize = _WinAPI_GetBitmapDimension($hHBitmap) Local $iWidth = DllStructGetData($tSize, 1) Local $iHeight = DllStructGetData($tSize, 2) Local $hGUI = GUICreate("MyGUI", $iWidth, $iHeight, -1, -1, $WS_POPUP, $WS_EX_LAYERED) Local $aPos = WinGetPos($hGUI) Local $hLayGUI = GUICreate("", 70, 23, $aPos[0] + ($aPos[2] - 70) / 2, $aPos[1] + $aPos[3] - 50, $WS_POPUP, $WS_EX_LAYERED, $hGUI) GUISetBkColor(0x2B5280, $hLayGUI) Local $iButton1 = GUICtrlCreateButton("Button1", 0, 0, 70, 23) GUICtrlSetState($iButton1, $GUI_FOCUS) _WinAPI_SetLayeredWindowAttributes($hLayGUI, 0x2B5280, 0, $LWA_COLORKEY) _WinAPI_UpdateLayeredWindowEx($hGUI, -1, -1, $hHBitmap) GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $hLayGUI) Local $iMsg = 0 While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE, $iButton1 ExitLoop EndSwitch WEnd GUIDelete($hLayGUI) GUIDelete($hGUI) Thank you!
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