Jump to content
Sign in to follow this  

Gui style not being acheived need some help

Recommended Posts


Hi, so I am having trouble getting my gui looking how I wish it to look. I have tried everything I can think of from making it myself to using Koda. Nothing seems to be working. I am fairly new at autoit, so I don't know if it is not possible or I am just to stupid to use the right styles.

Posted Image

This is the style of bar that I am trying to achieve, but I can't seem to get it to look this way. Is it even possible in autoit to make a gui like this.

Basically it has a 1 pixel black border and uses a transparent png background and an xml file to define the gloss, flat or whatelse. I don't care about the xml file as I have made a background image to use. But if I use a bg img then my label to move my bar around becomes unusable.

#Region ### START Koda GUI section ### Form=C:\scripts\test.kxf
$gui = GUICreate("", 264, 24, 780, 0, BitOR($WS_BORDER,$WS_Popup), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
GUICtrlCreateLabel("", 0, 0, 10, 23, $WS_GROUP, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetBkColor(-1, 0x0000FF)
$connect = GUICtrlCreateButton("connect", 191, 0, 26, 23, $BS_BITMAP)
GUICtrlSetOnEvent(-1, "connectclick")
GUICtrlSetImage(-1, @ScriptDir & "\connect.bmp", -1)
GUICtrlSetTip(-1, "Connect to the selected server")
$exit = GUICtrlCreateButton("exit", 220, 0, 20, 23, BitOR($BS_BITMAP,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "exitclick")
GUICtrlSetImage(-1, @ScriptDir & "\exit.bmp", -1)
GUICtrlSetTip(-1, "Exit Usapsys RDP Dock")
$edit = GUICtrlCreateButton("edit", 242, 0, 20, 23, BitOR($BS_BITMAP,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "editclick")
GUICtrlSetImage(-1, @ScriptDir & "\edit.bmp", -1)
GUICtrlSetTip(-1, "Edit the variables in the ini file")
$dboxh = GUICtrlCreateCombo("", 10, 0, 90, 25)
For $i = 1 To $hsrvs[0][0]
    GUICtrlSetData($dboxh, $hsrvs[$i][1], "")
$dBoxl = GUICtrlCreateCombo("", 100, 0, 90, 25)
For $i = 1 To $lsrvs[0][0]
    GUICtrlSetData($dBoxl, $lsrvs[$i][1], "")
#EndRegion ### END Koda GUI section ###

This is my working gui as of right now. It looks very ugly and out of place on my desktop. Would it even be possible to make my gui achieve a look similar to the bar posted?

Share this post

Link to post
Share on other sites

First off, your background color is off. Find a color picker on the forum to make it look a little better. For the buttons, instead of actually making a button, Valuater made great script called XSkin. This is exactly what you need for the buttons. Test out XSkin and if you have questions, come back and we can answer them.

Edit: For the ... part of the buttons, there is a function floating around on this forum that can measure the length of a given string. That will tell you if you need to use ... or not. I don't know of a way to emulate the system tray.

Edited by dantay9

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

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