#include #include #include #Include #include #Include #Include #Include #include #Include ; Opt("TrayMenuMode", 3) ; Global Const $Text_en = "ITLISASTIMEACQUARTERDCTWENTYFIVEXHALFBTENFTOPASTERUNINE" & _ "ONESIXTHREEFOURFIVETWOEIGHTELEVENSEVENTWELVETENSEOCLOCK" Global Const $Text_de = "ESKISTAFÜNFZEHNBYGVORGNACHVIERTELHALBVORNACHEINSLMEZWEI" & _ "DREIAUJVIERFÜNFTOSECHSSIEBENLACHTNEUNZEHNELFZWÖLFUNKUHR" Global Const $Text_nl = "HETKISAVIJFTIENBTZVOOROVERMEKWARTVOORSPWOVERHALFTHGÉÉNS" & _ "TWEEPVCDRIEVIERVIJFZESZEVENONEGENACHTTIENELFTWAALFBFUUR" Global Const $Text_fr = "ILRESTGJUNEDEUXCINQDIXQUATREPHUITSEPTNEUFSIXDOUZEUTROIS" & _ "ONZEDHEURESMOINSGFJWLPETVINGTBLWVLEDEMIWDIXYUQUARTZCINQ" Global $Char_Text[111], $aDots[111] Global $Char_Text_Remain[5], $Color_Chooser[7] Global $Text_en_Split = StringSplit($Text_en, "") Global $Text_de_Split = StringSplit($Text_de, "") Global $Text_nl_Split = StringSplit($Text_nl, "") Global $Text_fr_Split = StringSplit($Text_fr, "") Global $Hour_Min = @HOUR & @MIN Global $sIni_File = @ScriptDir & "\QLOCKTWOSettings.ini" Global $Text_En_Min_Highlight[12][2] = _ [["00", "1|2|4|5|105|106|107|108|109|110"], _ ["05", "1|2|4|5|29|30|31|32|45|46|47|48"], _ ["10", "1|2|4|5|39|40|41|45|46|47|48"], _ ["15", "1|2|4|5|12|14|15|16|17|18|19|20|45|46|47|48"], _ ["20", "1|2|4|5|23|24|25|26|27|28|45|46|47|48"], _ ["25", "1|2|4|5|23|24|25|26|27|28|29|30|31|32|45|46|47|48"], _ ["30", "1|2|4|5|34|35|36|37|45|46|47|48"], _ ["35", "1|2|4|5|23|24|25|26|27|28|29|30|31|32|43|44"], _ ["40", "1|2|4|5|23|24|25|26|27|28|43|44"], _ ["45", "1|2|4|5|12|14|15|16|17|18|19|20|43|44"], _ ["50", "1|2|4|5|39|40|41|43|44"], _ ["55", "1|2|4|5|29|30|31|32|43|44"]] Global $Text_En_Hour_Highlight[12][2] = _ [["01", "56|57|58"], _ ["02", "75|76|77"], _ ["03", "62|63|64|65|66"], _ ["04", "67|68|69|70"], _ ["05", "71|72|73|74"], _ ["06", "59|60|61"], _ ["07", "89|90|91|92|93"], _ ["08", "78|79|80|81|82"], _ ["23", "52|53|54|55"], _ ["10", "100|101|102"], _ ["11", "83|84|85|86|87|88"], _ ["12", "94|95|96|97|98|99"]] Global $Text_de_Min_Highlight[12][2] = _ [["00", "1|2|4|5|6|108|109|110"], _ ["05", "1|2|4|5|6|8|9|10|11|23|24|25|26"], _ ["10", "1|2|4|5|6|12|13|14|15|23|24|25|26"], _ ["15", "1|2|4|5|6|27|28|29|30|31|32|33|41|42|43|44"], _ ["20", "1|2|4|5|6|12|13|14|15|19|20|21|34|35|36|37"], _ ["25", "1|2|4|5|6|8|9|10|11|19|20|21|34|35|36|37"], _ ["30", "1|2|4|5|6|34|35|36|37"], _ ["35", "1|2|4|5|6|8|9|10|11|23|24|25|26|34|35|36|37"], _ ["40", "1|2|4|5|6|12|13|14|15|23|24|25|26|34|35|36|37"], _ ["45", "1|2|4|5|6|27|28|29|30|31|32|33|38|39|40"], _ ["50", "1|2|4|5|6|12|13|14|15|19|20|21"], _ ["55", "1|2|4|5|6|8|9|10|11|19|20|21"]] Global $Text_de_Hour_Highlight[12][2] = _ [["01", "45|46|47|48"], _ ["02", "52|53|54|55"], _ ["03", "56|57|58|59"], _ ["04", "63|64|65|66"], _ ["05", "67|68|69|70"], _ ["06", "73|74|75|76|77"], _ ["07", "78|79|80|81|82|83"], _ ["08", "85|86|87|88"], _ ["23", "89|90|91|92"], _ ["10", "93|94|95|96"], _ ["11", "97|98|99"], _ ["12", "100|101|102|103|104"]] Global $Text_nl_Min_Highlight[12][2] = _ [["00", "1|2|3|5|6|108|109|110"], _ ["05", "1|2|3|5|6|8|9|10|11|41|42|43|44"], _ ["10", "1|2|3|5|6|12|13|14|15|41|42|43|44"], _ ["15", "1|2|3|5|6|29|30|31|32|33|41|42|43|44"], _ ["20", "1|2|3|5|6|12|13|14|15|45|46|47|48|34|35|36|37"], _ ["25", "1|2|3|5|6|8|9|10|11|45|46|47|48|34|35|36|37"], _ ["30", "1|2|3|5|6|45|46|47|48"], _ ["35", "1|2|3|5|6|8|9|10|11|41|42|43|44|45|46|47|48"], _ ["40", "1|2|3|5|6|12|13|14|15|41|42|43|44|45|46|47|48"], _ ["45", "1|2|3|5|6|29|30|31|32|33|34|35|36|37"], _ ["50", "1|2|3|5|6|12|13|14|15|34|35|36|37"], _ ["55", "1|2|3|5|6|8|9|10|11|34|35|36|37"]] Global $Text_nl_Hour_Highlight[12][2] = _ [["01", "52|53|54"], _ ["02", "56|57|58|59"], _ ["03", "63|64|65|66"], _ ["04", "67|68|69|70"], _ ["05", "71|72|73|74"], _ ["06", "75|76|77"], _ ["07", "78|79|80|81|82"], _ ["08", "89|90|91|92"], _ ["09", "84|85|86|87|88"], _ ["10", "93|94|95|96"], _ ["11", "97|98|99"], _ ["12", "100|101|102|103|104|105"]] Global $Text_fr_Hour_Highlight[12][2] = _ [["01","1|2|4|5|6|9|10|11|61|62|63|64|65"], _ ["02", "1|2|4|5|6|12|13|14|15|61|62|63|64|65|66"], _ ["03", "1|2|4|5|6|51|52|53|54|55|61|62|63|64|65|66"], _ ["04", "1|2|4|5|6|23|24|25|26|27|28|61|62|63|64|65|66"], _ ["05", "1|2|4|5|6|16|17|18|19|61|62|63|64|65|66"], _ ["06", "1|2|4|5|6|42|43|44|61|62|63|64|65|66"], _ ["07", "1|2|4|5|6|34|35|36|37|61|62|63|64|65|66"], _ ["08", "1|2|4|5|6|30|31|32|33|61|62|63|64|65|66"], _ ["23", "1|2|4|5|6|38|39|40|41|61|62|63|64|65|66"], _ ["10", "1|2|4|5|6|20|21|22|61|62|63|64|65|66"], _ ["11", "1|2|4|5|6|56|57|58|59|61|62|63|64|65|66"], _ ["12", "1|2|4|5|6|45|46|47|48|49|61|62|63|64|65|66"]] Global $Text_fr_Min_Highlight[12][2] = _ [["00", ""], _ ["05", "107|108|109|110"], _ ["10", "96|97|98"], _ ["15", "78|79|101|102|103|104|105"], _ ["20", "80|81|82|83|84"], _ ["25", "80|81|82|83|84|107|108|109|110"], _ ["30", "78|79|91|92|93|94"], _ ["35", "67|68|69|70|71|80|81|82|83|84|107|108|109|110"], _ ["40", "67|68|69|70|71|80|81|82|83|84"], _ ["45", "67|68|69|70|71|89|90|101|102|103|104|105"], _ ["50", "67|68|69|70|71|96|97|98"], _ ["55", "67|68|69|70|71|107|108|109|110"]] Global $Color_Themes[6][4] = _ [["Black Ice Tea", 0x000000, 0x303030, 0xFFFFFF], _ ["Cherry Cake", 0xDC0817, 0xB80713, 0xFFFFFF], _ ["Vanilla Sugar", 0xC4C3C1, 0xA2A1A0, 0xFFFFFF], _ ["Frozen Blackberry", 0x503082, 0x6A4F93, 0xFFFFFF], _ ["Lime Juice", 0xA8AF0A, 0x8C9107, 0xFFFFFF], _ ["Shine Grey", 0xCDC8B1, 0xAFA783, 0xB84832]] ;;;;;Theme Titel, BG Color, Color Dark, Color Lit $Selected_Theme = IniRead($sIni_File, "Theme", "Selected", 0) $Selected_Lan = IniRead($sIni_File, "Language", "Selected", "en") $Selected_Size = IniRead($sIni_File, "Size", "Selected", 100) Switch $Selected_Lan Case "en" $lang = $Text_en_Split Case "de" $lang = $Text_de_Split Case "nl" $lang = $Text_nl_Split Case "fr" $lang = $Text_fr_Split EndSwitch Global $Text_Color_Dark = $Color_Themes[$Selected_Theme][2] Global $Text_Color_Lit = $Color_Themes[$Selected_Theme][3] Global $Form_BK_Color = $Color_Themes[$Selected_Theme][1] Global $Combo_Add $QclockTwoForm = GUICreate("QLOCK TWO", _size(260), _size(240), -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetBkColor($Form_BK_Color) _drawborder($QclockTwoForm,_size(260),_size(240),"4","0x222222","0x444444","15") ;sets up the border on background _GuiRoundCorners($QclockTwoForm,0, 0, 30, 30) ; makes the background have round corners WinSetTrans($QclockTwoForm,"",230) ;$BK_Shine = GUICtrlCreatePic("", 0, 0, _size(260), _size(240)) ;_SetImage($BK_Shine, 'QLOCK_shine.png') ;GUICtrlSetState(-1, $GUI_DISABLE) $k = 1 For $i = 1 To 10 For $j = 1 To 11 $Char_Text[$k] = GUICtrlCreateLabel($lang[$k], _size(20 * $j), _size(20 * $i), _size(20), _size(20), $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, _size(8.5), _size(400)) $k += 1 Next Next If $Selected_Lan = "en" Then GUICtrlSetData($char_Text[105], "O'") EndIf $Char_Text_Remain[1] = GUICtrlCreateLabel(Chr(149), _size(10), _size(10), _size(10), _size(20), $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, _size(11), _size(400)) $Char_Text_Remain[2] = GUICtrlCreateLabel(Chr(149), _size(240), _size(10), _size(10), _size(20), $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, _size(11), _size(400)) $Char_Text_Remain[3] = GUICtrlCreateLabel(Chr(149), _size(240), _size(220), _size(10), _size(20), $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, _size(11), _size(400)) $Char_Text_Remain[4] = GUICtrlCreateLabel(Chr(149), _size(10), _size(220), _size(10), _size(20), $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, _size(11), _size(400)) $Tray_Color = TrayCreateMenu("Color") For $r = 1 To 6 Step 1 $Color_Chooser[$r] = TrayCreateItem($Color_Themes[$r - 1][0],$Tray_Color) Next $Tray_size = TrayCreateMenu("Size") $tray_size50 = TrayCreateItem("50%", $Tray_size) $tray_size100 = TrayCreateItem("100%", $Tray_size) $tray_size150 = TrayCreateItem("150%", $Tray_size) $tray_size200 = TrayCreateItem("200%", $Tray_size) $tray_size250 = TrayCreateItem("250%", $Tray_size) $tray_size300 = TrayCreateItem("300%", $Tray_size) $Tray_Lang = TrayCreateMenu("Language") $Lang_Chooser_en = TrayCreateItem("English" ,$Tray_Lang) $Lang_Chooser_de = TrayCreateItem("Deutsch" ,$Tray_Lang) $Lang_Chooser_nl = TrayCreateItem("Nederlands" ,$Tray_Lang) $Lang_Chooser_fr = TrayCreateItem("Français" ,$Tray_Lang) TrayCreateItem("") $Tray_Exit = TrayCreateItem("Exit") GUISetState(@SW_SHOW) _CalibrateTime() #EndRegion ### END Koda GUI section ### ; While 1 If $Hour_Min <> @HOUR & @MIN Then _CalibrateTime() $Hour_Min = @HOUR & @MIN EndIf $nMsg = TrayGetMsg() Switch $nMsg Case $Tray_Exit Exit Case $Color_Chooser[1] _Change_Color(1) Case $Color_Chooser[2] _Change_Color(2) Case $Color_Chooser[3] _Change_Color(3) Case $Color_Chooser[4] _Change_Color(4) Case $Color_Chooser[5] _Change_Color(5) Case $Color_Chooser[6] _Change_Color(6) Case $Lang_Chooser_en IniWrite($sIni_File, "Language", "Selected", "en") _RestartScript() Case $Lang_Chooser_de IniWrite($sIni_File, "Language", "Selected", "de") _RestartScript() Case $Lang_Chooser_nl IniWrite($sIni_File, "Language", "Selected", "nl") _RestartScript() Case $Lang_Chooser_fr IniWrite($sIni_File, "Language", "Selected", "fr") _RestartScript() Case $Tray_Size50 IniWrite($sIni_File, "Size", "Selected", 50) _RestartScript() Case $Tray_Size100 IniWrite($sIni_File, "Size", "Selected", 100) _RestartScript() Case $Tray_Size150 IniWrite($sIni_File, "Size", "Selected", 150) _RestartScript() Case $Tray_Size200 IniWrite($sIni_File, "Size", "Selected", 200) _RestartScript() Case $Tray_Size250 IniWrite($sIni_File, "Size", "Selected", 250) _RestartScript() Case $Tray_Size300 IniWrite($sIni_File, "Size", "Selected", 300) _RestartScript() EndSwitch If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd ; Func _size($s) ; $Selected_Size = 100 $s = $s / 100 $s = $s * $Selected_Size Return $s EndFunc ; Func _CalibrateTime() $Get_Min = @MIN $Get_Hour = _Hour_Correct(@HOUR) Switch $Selected_Lan Case "en" $T_Min = $Text_en_Min_Highlight $T_Hour = $Text_en_Hour_Highlight Case "de" $T_Min = $Text_de_Min_Highlight $T_Hour = $Text_de_Hour_Highlight Case "nl" $T_Min = $Text_nl_Min_Highlight $T_Hour = $Text_nl_Hour_Highlight Case "fr" $T_Min = $Text_fr_Min_Highlight $T_Hour = $Text_fr_Hour_Highlight EndSwitch For $g = 0 To 11 If _GetMinNumber($Get_Min) = $T_Min[$g][0] Then _Set_Remainder_Min(@MIN) $Text_Num_Split = StringSplit($T_Min[$g][1], "|") $Text_Hr_Split = StringSplit($T_Hour[$Get_Hour][1], "|") For $h = 1 To 110 GUICtrlSetColor($Char_Text[$h], $Text_Color_Dark) For $l = 1 To $Text_Num_Split[0] If $Text_Num_Split[$l] = $h Then GUICtrlSetColor($Char_Text[$Text_Num_Split[$l]], $Text_Color_Lit) EndIf Next For $m = 1 To $Text_Hr_Split[0] If $Text_Hr_Split[$m] = $h Then GUICtrlSetColor($Char_Text[$Text_Hr_Split[$m]], $Text_Color_Lit) EndIf Next Next Return EndIf Next EndFunc ; Func _Change_Color($colorNumb) GUISetBkColor($Color_Themes[$colorNumb-1][1]) $Text_Color_Dark = $Color_Themes[$colorNumb-1][2] $Text_Color_Lit = $Color_Themes[$colorNumb-1][3] _CalibrateTime() IniWrite($sIni_File, "Theme", "Selected", $colorNumb-1) EndFunc ; Func _GetMinNumber($s_Number) Switch $s_Number Case 0 To 4 Return "00" Case 5 To 9 Return "05" Case 10 To 14 Return "10" Case 15 To 19 Return "15" Case 20 To 24 Return "20" Case 25 To 29 Return "25" Case 30 To 34 Return "30" Case 35 To 39 Return "35" Case 40 To 44 Return "40" Case 45 To 49 Return "45" Case 50 To 54 Return "50" Case 55 To 59 Return "55" EndSwitch EndFunc ; Func _Hour_Correct($s_Hour) Switch $s_Hour Case 13 to 23 $Hour = ($s_Hour - 13) Case 00 $Hour = 11 Case Else $Hour = $s_Hour -1 EndSwitch Switch $Selected_Lan Case "en", "fr" If @MIN > 34 Then $Hour += 1 If $Hour > 11 Then $Hour = 00 EndIf Case "de" If @MIN > 19 Then $Hour += 1 If $Hour > 11 Then $Hour = 00 EndIf Case "nl" If @MIN > 24 Then $Hour += 1 If $Hour > 11 Then $Hour = 00 EndIf EndSwitch Return $Hour EndFunc ; Func _Set_Remainder_Min($q_Min) Local $e_Count $w_Min = StringRight($q_Min, 1) Switch $w_Min Case 1, 6 $e_Count = 1 Case 2, 7 $e_Count = 2 Case 3, 8 $e_Count = 3 Case 4, 9 $e_Count = 4 EndSwitch For $t = 1 To 4 GUICtrlSetColor($Char_Text_Remain[$t], $Text_Color_Dark) Next For $t = 1 To $e_Count GUICtrlSetColor($Char_Text_Remain[$t], $Text_Color_Lit) Next EndFunc ; Func _RestartScript() If @Compiled = 1 Then Run( FileGetShortName(@ScriptFullPath)) Else Run( FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath)) EndIf Exit EndFunc ; func _SetImage($hWnd, $sImage) const $STM_SETIMAGE = 0x0172 local $hImage, $hBitmap, $Style, $Error = false if not IsHWnd($hWnd) then $hWnd = GUICtrlGetHandle($hWnd) if $hWnd = 0 then return SetError(1, 0, 0) endif endif _GDIPlus_Startup() $hImage = _GDIPlus_BitmapCreateFromFile($sImage) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) if $hBitmap = 0 then return SetError(1, 0, 0) endif $Style = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE) if @error then $Error = 1 else _WinAPI_SetWindowLong($hWnd, $GWL_STYLE, BitOR($Style, Hex($SS_BITMAP))) if @error then $Error = 1 else _WinAPI_DeleteObject(_SendMessage($hWnd, $STM_SETIMAGE, $IMAGE_BITMAP, 0)) _SendMessage($hWnd, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap) if @error then $Error = 1 endif endif endif if $Error then _WinAPI_DeleteObject($hBitmap) endif _GDIPlus_BitmapDispose($hImage) _GDIPlus_Shutdown() return SetError($Error, 0, not $Error) endfunc; _SetImage Func _GuiRoundCorners($h_win, $i_x1, $i_y1, $i_x3, $i_y3) Dim $pos, $ret, $ret2 $pos = WinGetPos($h_win) $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $pos[2], "long", $pos[3], "long", $i_x3, "long", $i_y3) If $ret[0] Then $ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $ret[0], "int", 1) If $ret2[0] Then Return 1 Else Return 0 EndIf Else Return 0 EndIf EndFunc ;==>_GuiRoundCorners func _drawborder($guiname,$gwt,$ght,$depth,$colour1,$colour2,$corner) _GDIPlus_Startup() $iC1 = StringReplace($colour1, "0x", "0xFF") $iC2 = StringReplace($colour2, "0x", "0xFF") Global $hDC = _WinAPI_GetDC($guiname) Global $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC) Global $hBrush = _GDIPlus_BrushCreateSolid($iC1) Global $hBrush1 = _GDIPlus_BrushCreateSolid($iC2) _GDIPlus_GraphicsSetSmoothingMode($hGraphics, 4) _GDIPlus_GraphicsDrawRoundRect($hGraphics, 0, 0, $gwt,$ght, $corner, $hBrush) _GDIPlus_GraphicsDrawRoundRect2($hGraphics, $depth, $depth, $gwt-($depth*2)-2, $ght-($depth*2)-2, $corner,$hBrush1) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BrushDispose($hBrush1) _WinAPI_ReleaseDC($guiname, $hDC) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() EndFunc Func _GDIPlus_GraphicsDrawRoundRect($hGraphics, $iX, $iY, $iWidth, $iHeight, $iRadius, $hBrush = 0, $hPen = 0) _GDIPlus_PenCreate($hPen) Local $hPath = _GDIPlus_GraphicsPathCreate() _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iRadius, $iY, $iX + $iWidth - ($iRadius * 2), $iY) _GDIPlus_GraphicsPathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY, $iRadius * 2, $iRadius * 2, 270, 90) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth, $iY + $iRadius, $iX + $iWidth, $iY + $iHeight - ($iRadius * 2)) _GDIPlus_GraphicsPathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 0, 90) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth - ($iRadius * 2), $iY + $iHeight, $iX + $iRadius, $iY + $iHeight) _GDIPlus_GraphicsPathAddArc($hPath, $iX, $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 90, 90) _GDIPlus_GraphicsPathAddLine($hPath, $iX, $iY + $iHeight - ($iRadius * 2), $iX, $iY + $iRadius) _GDIPlus_GraphicsPathAddArc($hPath, $iX, $iY, $iRadius * 2, $iRadius * 2, 180, 90) ;Draw the font onto the new bitmap _GDIPlus_GraphicsPathCloseFigure($hPath) If $hBrush <> 0 Then _GDIPlus_GraphicsFillPath($hGraphics, $hBrush, $hPath) _GDIPlus_GraphicsDrawPath($hGraphics, $hPen, $hPath) _GDIPlus_GraphicsPathDispose($hPath) _GDIPlus_PenDispose($hPen) EndFunc Func _GDIPlus_GraphicsDrawRoundRect2($hGraphics, $iX, $iY, $iWidth, $iHeight, $iRadius, $hBrush = 0, $hPen = 0) _GDIPlus_PenCreate($hPen) Local $hPath = _GDIPlus_GraphicsPathCreate() _GDIPlus_GraphicsPathAddArc($hPath, $iX + $iWidth-33, 3, 23,23,0, 360) ; this is the circle around the X _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iRadius, $iY, $iX + $iWidth - ($iRadius * 2), $iY) _GDIPlus_GraphicsPathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY, $iRadius * 2, $iRadius * 2, 270, 90) ;;;;;;;;;;;;;;;;;;;;;;;;;;Script for the X _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth - ($iRadius * 2), $iY, $iX + $iWidth-29, 5) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth -28, 7,$iX + $iWidth -22,13) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth -16, 7,$iX + $iWidth -14,8) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth -21,14,$iX + $iWidth -14,21) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth -15,22,$iX + $iWidth -22,16) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth -28, 22,$iX + $iWidth-29 ,21) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth -23, 15,$iX + $iWidth-29 ,8) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth-29 ,8,$iX + $iWidth - ($iRadius * 2), $iY) ;;;;;;;;;;;;;;;;;;;;;;;;;Script for the X ends _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth, $iY + $iRadius, $iX + $iWidth, $iY + $iHeight - ($iRadius * 2)) _GDIPlus_GraphicsPathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 0, 90) _GDIPlus_GraphicsPathAddLine($hPath, $iX + $iWidth - ($iRadius * 2), $iY + $iHeight, $iX + $iRadius, $iY + $iHeight) _GDIPlus_GraphicsPathAddArc($hPath, $iX, $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 90, 90) _GDIPlus_GraphicsPathAddLine($hPath, $iX, $iY + $iHeight - ($iRadius * 2), $iX, $iY + $iRadius) _GDIPlus_GraphicsPathAddArc($hPath, $iX, $iY, $iRadius * 2, $iRadius * 2, 180, 90) ;Draw the font onto the new bitmap _GDIPlus_GraphicsPathCloseFigure($hPath) If $hBrush <> 0 Then _GDIPlus_GraphicsFillPath($hGraphics, $hBrush, $hPath) _GDIPlus_GraphicsDrawPath($hGraphics, $hPen, $hPath) _GDIPlus_GraphicsPathDispose($hPath) _GDIPlus_PenDispose($hPen) EndFunc Func _GDIPlus_GraphicsPathCreate($iFillMode = 0) Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreatePath", "int", $iFillMode, "int*", 0); If @error Then Return SetError(@error, @extended, 0) Return SetError($aResult[0], 0, $aResult[2]) EndFunc Func _GDIPlus_GraphicsPathAddLine($hGraphicsPath, $iX1, $iY1, $iX2, $iY2) Local $aResult = DllCall($ghGDIPDll, "int", "GdipAddPathLine", "hwnd", $hGraphicsPath, "float", $iX1, "float", $iY1, _ "float", $iX2, "float", $iY2) If @error Then Return SetError(@error, @extended, 0) Return SetError($aResult[0], 0, 0) EndFunc Func _GDIPlus_GraphicsPathAddArc($hGraphicsPath, $iX, $iY, $iWidth, $iHeight, $iStartAngle, $iSweepAngle) Local $aResult = DllCall($ghGDIPDll, "int", "GdipAddPathArc", "hwnd", $hGraphicsPath, "float", $iX, "float", $iY, _ "float", $iWidth, "float", $iHeight, "float", $iStartAngle, "float", $iSweepAngle) If @error Then Return SetError(@error, @extended, 0) Return SetError($aResult[0], 0, 0) EndFunc Func _GDIPlus_GraphicsPathCloseFigure($hGraphicsPath) Local $aResult = DllCall($ghGDIPDll, "int", "GdipClosePathFigure", "hwnd", $hGraphicsPath) If @error Then Return SetError(@error, @extended, 0) Return SetError($aResult[0], 0, 0) EndFunc Func _GDIPlus_GraphicsPathDispose($hGraphicsPath) Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeletePath", "hwnd", $hGraphicsPath) If @error Then Return SetError(@error, @extended, 0) Return SetError($aResult[0], 0, 0) EndFunc Func _GDIPlus_GraphicsDrawPath($hGraphics, $hPen, $hGraphicsPath) Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawPath", "hwnd", $hGraphics, "hwnd", $hPen, "hwnd", $hGraphicsPath) If @error Then Return SetError(@error, @extended, 0) Return SetError($aResult[0], 0, 0) EndFunc Func _GDIPlus_GraphicsFillPath($hGraphics, $hBrush, $hGraphicsPath) Local $aResult = DllCall($ghGDIPDll, "int", "GdipFillPath", "hwnd", $hGraphics, "hwnd", $hBrush, "hwnd", $hGraphicsPath) If @error Then Return SetError(@error, @extended, 0) Return SetError($aResult[0], 0, 0) EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func SetBitmap($hGUI, $hImage, $iOpacity) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize ) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha" , $iOpacity ) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC (0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC ($hMemDC) EndFunc