#include <GUIConstantsEx.au3>
#include <WinAPIGdi.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#cs
<----------------------- $iW ----------------------->
|
|
$iH
|
|
- <--------- $w -------><--- $r --->
|
|
$p
|
|
-
#ce
$iW=500
$iH=200
$w=90
$p=25
$r=20
$iFont=16
$bExpand=True
; Create GUI
Local $hForm = GUICreate("Test", $iW, $iH+$p, (@DesktopWidth-$iW+$w+$r)/2, -$iH, $WS_POPUP, $WS_EX_TOPMOST)
GUISetBkColor(0xdedede)
$hExit = GUICtrlCreateLabel("r", $iW-$r-$w/4-($iFont+4)/2, $iH+($p-($iFont+4))/2, $iFont+4, $iFont+4, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, $iFont, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0x505050)
GUICtrlSetCursor(-1,0)
$hCfg = GUICtrlCreateLabel("@", $iW-$r-2*$w/4-($iFont+4)/2, $iH+($p-($iFont+4))/2, $iFont+4, $iFont+4, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, $iFont, 400, 0, "Webdings")
GUICtrlSetCursor(-1,0)
GUICtrlSetColor(-1, 0x505050)
$hExpand = GUICtrlCreateLabel("6", $iW-$r-3.5*$w/4-($iFont+4)/2, $iH+($p-($iFont+4))/2, $iFont+4, $iFont+4, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, $iFont, 400, 0, "Webdings")
GUICtrlSetCursor(-1,0)
GUICtrlSetColor(-1, 0x505050)
Local $aPoint[9][2] = [[0, 0],[$iW, 0],[$iW, $iH],[$iW-$r,$iH],[$iW-$r-$p/3,$iH+$p],[$iW-$r-$w,$iH+$p],[$iW-$r-$w-$p/3,$iH],[0, $iH],[0, 0]]
Local $hRgn = _WinAPI_CreatePolygonRgn($aPoint)
_WinAPI_SetWindowRgn($hForm, $hRgn, 0)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $hExit
Exit
Case $hCfg
MsgBox(0,"","You won! What?...")
Case $hExpand
If $bExpand Then
GUICtrlSetData($hExpand,"5")
WinMove($hForm, "", (@DesktopWidth-$iW+$w+$r)/2, 0, $iW, $iH+$p,5)
$bExpand=False
Else
GUICtrlSetData($hExpand,"6")
WinMove($hForm, "", (@DesktopWidth-$iW+$w+$r)/2, -$iH, $iW, $iH+$p,5)
$bExpand=True
EndIf
EndSwitch
WEnd
Try this, see if it fits. (modified: made some changes)