Jump to content

Circular GUI?


Recommended Posts

There is no math needed:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

Global Const $iW = 800, $iH = 800
Global Const $hGUI = GUICreate("Round GUI", $iW, $iH, -1, -1, $WS_POPUP)
GUISetBkColor(0x0)
Global Const $hRegion = _WinAPI_CreateRoundRectRgn(0, 0, $iW, $iH, $iW, $iH)
_WinAPI_SetWindowRgn($hGUI, $hRegion)
Global Const $iBtn_X = GUICtrlCreateButton("Exit", ($iW - 50) / 2, ($iH - 50) / 2, 50, 50)
GUISetState()

Do
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $iBtn_X
            _WinAPI_DeleteObject($hRegion)
            GUIDelete()
            Exit
    EndSwitch
Until False

 

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

UEZ thanks. Can i clean the resource in this way? There are drawback?

_WinAPI_SetWindowRgn($hGUI, $hRegion)
_WinAPI_DeleteObject($hRegion) ;<<<<

Or i need to delete only when i close the GUI?

Edited by MyEarth
Link to comment
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
 Share

  • Recently Browsing   0 members

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