Jump to content
Sign in to follow this  
GraaF1337

GUI Related Questions.

Recommended Posts

GraaF1337

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) 2kio8p.jpg

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)scyyv6.jpg

So if you have an idea how to create one of these im very interested in how to create them! :)

Edited by GraaF1337

Share this post


Link to post
Share on other sites
Melba23

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
GraaF1337

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? :)

Share this post


Link to post
Share on other sites
FireFox

You can create shaped GUI using a PNG and the transparent part of the PNG can be used as corners.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Melba23

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
GraaF1337

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! :)

Share this post


Link to post
Share on other sites
FireFox

Can you give me an example of that please? :)

#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 by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
GraaF1337
#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! :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.