Jump to content

Recommended Posts

Posted (edited)

Hi.

I Have got two questions. ;)

1. How can i change GUI style to this? (Border)

Posted Image

2. And how can i change Button style to this?

Unclicked Button:

Posted Image

Clicked Button:

Posted Image

Please help me.

P.S. Sorry for my little english, but i am from poland :)

Edited by power2anger
Posted (edited)

@power2anger

Use this exStyle:

$WS_EX_TOOLWINDOW

Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog box that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by typing ALT+SPACE.

Disable Win Theme in button...

DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hButton, "wstr", 0, "wstr", 0)

Example:

#include <guiconstantsex.au3>
#include <windowsconstants.au3>

_Example()

; example
Func _Example()
    Local $iMsg, $iButton1

    GUICreate("My GUI", 120, 80, -1, -1, -1, $WS_EX_TOOLWINDOW) ; will create a dialog box that when displayed is centered
    $iButton1 = GUICtrlCreateButton("Start", 10, 40, 100)

    ; Disable Win Theme in button...
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iButton1), "wstr", 0, "wstr", 0)

    GUISetState(@SW_SHOW) ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
    While 1
        $iMsg = GUIGetMsg()

        If $iMsg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc   ;==>_Example

Regards,

João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

Try this:

$iButton1 = GUICtrlCreateButton("Start", 10, 40, 100, -1, $BS_FLAT)

$BS_FLAT = Specifies that the button is two-dimensional; it does not use the default shading to create a 3-D image.

Regards,

João Carlos.

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted (edited)

When you add a style, you must add the appropriate file variables, in this case is:

#include <buttonconstants.au3>

See:

#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#include <buttonconstants.au3>

_Example()

; example
Func _Example()
    Local $iMsg, $iButton1

    GUICreate("My GUI", 120, 80, -1, -1, -1, $WS_EX_TOOLWINDOW) ; will create a dialog box that when displayed is centered
    $iButton1 = GUICtrlCreateButton("Start", 10, 40, 100, -1, $BS_FLAT)

    ; Disable Win Theme in button...
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iButton1), "wstr", 0, "wstr", 0)

    GUISetState(@SW_SHOW) ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
    While 1
        $iMsg = GUIGetMsg()

        If $iMsg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc   ;==>_Example

Regards,

João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

  • Moderators
Posted

power2anger,

Next time please use a less controversial title for the GUI. I suggest you read the Forum Rules before you post again - particularly the bit which states: ;)

"Any discussion of using AutoIt to launch or interact with a game or game server violates our rules"

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...