Advertisement
Guest User

Pixel Predator v1.2.1 Release Copy

a guest
Jun 4th, 2019
10,240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.     Name: Pixel Predator v1.2.1 (Release Copy)
  3.     Written By: Hellbent aka CivReborn
  4.     Date Started: June 2nd, 2019
  5.     Date Of Last Edit: June 3rd,2019
  6.     Paste: https://pastebin.com/JqpTYAFT
  7.     Description: Pixel Search Script
  8. */
  9. #SingleInstance,Force
  10. #NoEnv
  11. ListLines,Off
  12. SetBatchLines,-1
  13. CoordMode,Mouse,Screen
  14. CoordMode,Pixel,Screen
  15. SetKeyDelay,30
  16. SetMouseDelay,30
  17. SetDefaultMouseSpeed,0
  18. Gdip_Startup()
  19. global HB_Button:=[],Selected_Color:="610094",Color_Edit:="0x610094",Stop:=1,X_Pos:="",Y_Pos:="",W_Pos:="",H_Pos:="",cx2:="",cy2:="",cx:="",cy:="",Commands:="",Variation:=0,Start_Key :="Numpad1",Stop_Key:="Numpad2",RTimes:=1,CMove:=1,CTimes:=1,XOff:=10,YOff:=10,TypeC:="Left",Send_Stuff:="",M_Delay:=30,Key_Delay:=30,Delay:=500
  20. Hotkey,%Start_Key%,Start_Search
  21. Hotkey,%Stop_Key%,Stop_Search
  22. Main := New Custom_Window( x:= 0 , y:= 0 , w:= 450 , h:= 300 , Name:= "1" , Options:= "+AlwaysOnTop -Caption -DPIScale" , Title:= "Pixel Predator v1.2" , Background_Bitmap:= PixelPredatorBG() )
  23. Gui,1:Add,Text,x5 y5 w30 h30 BackgroundTrans gTag
  24. Gui,1:Add,Text,x85 y6 w280 h28 BackgroundTrans gMove_Window
  25. Gui,1:Add,Text,x409 y6 w15 h15 BackgroundTrans gMin_Window
  26. Gui,1:Add,Text,x429 y6 w15 h15 BackgroundTrans gGuiClose
  27. Gui,1:Color,222222,222222
  28. Gui,1:Font,cffffff s8 ,arial
  29. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=30  , y := 52 , w := 100 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "Set Color" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "SetColor" , Default_Button := 0 , Roundness:=2 ) )
  30. Gui,1:Add,Progress,x145 y54 w50 h24 Background000000 c%Selected_Color% vSelected_Color,100
  31. Gui,1:Add,Edit, x210 y55 w80 h22 Center vColor_Edit,% Color_Edit
  32. Gui,1:Add,Edit, x365 y55 w50 h22 Center Number Limit2 vVariation,% Variation
  33. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=30  , y := 97 , w := 100 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "Set Search Area" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "Set_Position" , Default_Button := 0 , Roundness:=2 ) )
  34. Gui,1:Add,Edit, x175 y100 w40 h22 Center ReadOnly vX_Pos,null
  35. Gui,1:Add,Edit, x245 y100 w40 h22 Center ReadOnly vY_Pos,null
  36. Gui,1:Add,Edit, x315 y100 w40 h22 Center ReadOnly vW_Pos,null
  37. Gui,1:Add,Edit, x385 y100 w40 h22 Center ReadOnly vH_Pos,null
  38. Global Truth:=[]
  39. Truth[1]:=New Flat_Round_Radio_Type_1(x:=35,y:=147,w:=60,Text:="True",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="333333",HighLightColor:="A866E2",State:=1,GroupArray:=Truth)
  40. Truth[2]:=New Flat_Round_Radio_Type_1(x+=w,y:=147,w:=80,Text:="False",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="333333",HighLightColor:="A866E2",State:=0,GroupArray:=Truth)
  41. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=210  , y := 138 , w := 195 , h := 38 , Button_Color := "22005C" , Button_Background_Color := "252525" , Text := "Open   ""Send""   Documentation" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "OpenDoc" , Default_Button := 0 , Roundness:=2 ) )
  42. Gui,1:Add,Edit, x25 y190 w260 h22 vCommands,% Commands
  43. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=293  , y := 187 , w := 30 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "C" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "Defall" , Default_Button := 0 , Roundness:=2 ) )
  44. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+5  , y := 187 , w := 30 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "M" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "DefallM" , Default_Button := 0 , Roundness:=2 ) )
  45. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+5  , y := 187 , w := 30 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "T" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "DefallT" , Default_Button := 0 , Roundness:=2 ) )
  46. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+5  , y := 187 , w := 30 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "?" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "Run_Command_Window" , Default_Button := 0 , Roundness:=2 ) )
  47. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=50  , y := 225 , w := 350 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "252525" , Text := "<><><><>   Hotkeys & Info   <><><><>" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "Run_Hotkey_Window" , Default_Button := 0 , Roundness:=2 ) )
  48. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=20  , y += h+3 , w := 130 , h := 30 , Button_Color := "22005C" , Button_Background_Color := "252525" , Text := "Start" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "StartBB" , Default_Button := 0 , Roundness:=2 ) )
  49. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+10  , y , w  , h := 30 , Button_Color := "22005C" , Button_Background_Color := "252525" , Text := "Stop" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "StopBB" , Default_Button := 0 , Roundness:=2 ) )
  50. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+10  , y , w  , h := 30 , Button_Color := "22005C" , Button_Background_Color := "252525" , Text := "Reload" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "1" , Label := "Reload" , Default_Button := 0 , Roundness:=2 ) )
  51. Main.Show_Window()
  52. GuiControl , % HB_Button[ 1 ].Window ": Focus" , % HB_Button[ 1 ].Hwnd
  53. SetTimer, HB_Button_Hover , 50
  54. return
  55. GuiClose:
  56.     ExitApp
  57. Tag(){
  58.     Stop:=1
  59.     try
  60.         run,https://www.youtube.com/channel/UCge0TKjySLXd8xeLib8F0rA
  61. }
  62. Move_Window(){
  63.     PostMessage,0xA1,2
  64. }
  65. Min_Window(){
  66.     Gui,1:Minimize
  67. }
  68. Reload(){
  69.     Stop:=1
  70.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  71.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  72.         return
  73.     Reload
  74. }
  75. OpenDoc(){
  76.     Stop:=1
  77.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  78.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  79.         return
  80.     try {
  81.         Run, https://autohotkey.com/docs/commands/Send.htm
  82.     }catch  {
  83.         Gui,1:+OwnDialogs
  84.         msgbox,,Failed to open Send Documentation Page,Google Search - Autohotkey Send
  85.     }
  86. }
  87. Defall(){
  88.     Stop:=1
  89.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  90.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  91.         return
  92.     GuiControl,1:,Commands,*1*1*1*10*10*Left*%M_Delay%*%Key_Delay%*%Delay%*
  93. }
  94. DefallM(){
  95.     Stop:=1
  96.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  97.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  98.         return
  99.     GuiControl,1:,Commands,*1*0*1*10*10*Left*%M_Delay%*%Key_Delay%*%Delay%*
  100. }
  101. DefallT(){
  102.     Stop:=1
  103.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  104.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  105.         return
  106.     GuiControl,1:,Commands,*1*0*0*10*10*Left*%M_Delay%*%Key_Delay%*%Delay%*
  107. }
  108. SetColor(){
  109.     Stop:=1
  110.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  111.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  112.         return
  113.     While(!GetKeyState("ctrl")){
  114.         ToolTip,Press ""Ctrl"" to set Search Color
  115.         MouseGetPos,tpx,tpy
  116.         PixelGetColor,Selected_Color,%tpx%,%tpy%,RGB
  117.         GuiControl,1:+c%Selected_Color%,Selected_Color
  118.         GuiControl,1:,Color_Edit,% Selected_Color
  119.     }
  120.     ToolTip,
  121. }
  122. StartBB(){
  123.     Stop:=1
  124.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  125.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  126.         return
  127.     Start_Search()
  128. }
  129. StopBB(){
  130.     Stop:=1
  131.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  132.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  133.         return
  134. }
  135. Set_Position(){
  136.     Stop:=1
  137.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  138.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  139.         return
  140.     SPOS()
  141. }
  142. SPOS(){
  143.     global
  144.     Gui,3:-Caption -DPIScale +LastFound +E0x80000 +ToolWindow +AlwaysOnTop
  145.     Gui,3:Show,x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% NA
  146.     hwnd1:=WinExist(),hbm := CreateDIBSection(A_ScreenWidth,A_ScreenHeight),hdc := CreateCompatibleDC(),obm := SelectObject(hdc,hbm)
  147.     G := Gdip_GraphicsFromHDC(hdc),Gdip_SetSmoothingMode(G,4),UpdateLayeredWindow(hwnd1, hdc, 0, 0,A_ScreenWidth,A_ScreenHeight)
  148.     Br1:=New_Brush("ff0066","ff"),Br2:=New_Brush("12e854","55"),Br3:=New_Brush("de0d0a","aa")
  149.     UpdateLayeredWindow(hwnd1, hdc),Pos_Setting_Active:=1,TL:=1
  150.     SetTimer,Draw_Cross,10
  151. }
  152. Draw_Cross:
  153.     Gdip_GraphicsClear(G)
  154.     if(TL=1){
  155.         MouseGetPos,cx,cy
  156.         Fill_Box(G,Br1,0,cy,A_ScreenWidth,1),Fill_Box(G,Br1,cx,0,1,A_ScreenHeight)
  157.         GuiControl,1:,X_Pos,% cx
  158.         GuiControl,1:,Y_Pos,% cy
  159.         X_Pos:=cx,Y_Pos:=cy
  160.     }
  161.     else if(TL=2){
  162.         MouseGetPos,cx2,cy2
  163.         if(cx2-cx>=0&&cy2-cy>=0){
  164.             OB:=0
  165.             Fill_Box(G,Br1,0,cy2,A_ScreenWidth,1),Fill_Box(G,Br1,cx2,0,1,A_ScreenHeight),Fill_Box(G,Br1,0,cy,A_ScreenWidth,1)
  166.             Fill_Box(G,Br1,cx,0,1,A_ScreenHeight),Fill_Box(G,Br2,cx,cy,cx2-cx,cy2-cy)
  167.             GuiControl,1:,W_Pos,% cx2 - cx
  168.             GuiControl,1:,H_Pos,% cy2 - cy
  169.         }
  170.         else if(cx2-cx>=0&&cy2-cy<0){
  171.             OB:=1
  172.             Fill_Box(G,Br1,0,cy2,A_ScreenWidth,1),Fill_Box(G,Br1,cx2,0,1,A_ScreenHeight),Fill_Box(G,Br1,0,cy,A_ScreenWidth,1)
  173.             Fill_Box(G,Br1,cx,0,1,A_ScreenHeight),Fill_Box(G,Br3,cx,cy2,cx2-cx,cy-cy2)
  174.             GuiControl,1:,W_Pos,% (cx2 - cx)
  175.             GuiControl,1:,H_Pos,% (cy2 - cy)*-1
  176.         }
  177.         else if(cx2-cx<0&&cy2-cy>=0){
  178.             OB:=1
  179.             Fill_Box(G,Br1,0,cy2,A_ScreenWidth,1),Fill_Box(G,Br1,cx2,0,1,A_ScreenHeight),Fill_Box(G,Br1,0,cy,A_ScreenWidth,1)
  180.             Fill_Box(G,Br1,cx,0,1,A_ScreenHeight),Fill_Box(G,Br3,cx2,cy,cx-cx2,cy2-cy)
  181.             GuiControl,1:,W_Pos,% (cx2 - cx)*-1
  182.             GuiControl,1:,H_Pos,% (cy2 - cy)
  183.         }
  184.         else if(cx2-cx<0&&cy2-cy<0){
  185.             OB:=1
  186.             Fill_Box(G,Br1,0,cy2,A_ScreenWidth,1),Fill_Box(G,Br1,cx2,0,1,A_ScreenHeight),Fill_Box(G,Br1,0,cy,A_ScreenWidth,1)
  187.             Fill_Box(G,Br1,cx,0,1,A_ScreenHeight),Fill_Box(G,Br3,cx2,cy2,cx-cx2,cy-cy2)
  188.             GuiControl,1:,W_Pos,% (cx2 - cx)*-1
  189.             GuiControl,1:,H_Pos,% (cy2 - cy)*-1
  190.         }
  191.     }
  192.     UpdateLayeredWindow(hwnd1, hdc)
  193.     return
  194. SortCommandList(){
  195.     GuiControlGet,Commands,1:,Commands
  196.     stringleft,tep,Commands,1
  197.     if(tep="*"){
  198.         CMove:="",CTimes:="",XOff:="",YOff:="",TypeC:="Left",RTimes:=1,Send_Stuff:=""
  199.         Loop, Parse, Commands,*
  200.         {
  201.             (A_Index=2)?(RTimes:=A_LoopField)
  202.             :(A_Index=3)?(CMove:=A_LoopField)
  203.             :(A_Index=4)?(CTimes:=A_LoopField)
  204.             :(A_Index=5)?(XOff:=A_LoopField)
  205.             :(A_Index=6)?(YOff:=A_LoopField)
  206.             :(A_Index=7)?(TypeC:=A_LoopField)
  207.             :(A_Index=8)?(M_Delay:=A_LoopField)
  208.             :(A_Index=9)?(Key_Delay:=A_LoopField)
  209.             :(A_Index=10)?(Delay:=A_LoopField)
  210.             :(A_Index=11)?(Send_Stuff:=A_LoopField)
  211.         }
  212.         Return True
  213.     }else   {
  214.         Gui,1:+OwnDialogs
  215.         MsgBox,,Error,There is a error with your command setup
  216.         Stop:=1
  217.         return False
  218.     }
  219. }
  220. Click_Function(x,y,LT,BTN){
  221.     CoordMode,Mouse,Screen
  222.     SetMouseDelay,%M_Delay%
  223.     index:=0
  224.     While(Index<LT&&!Stop){
  225.         Click %BTN%,%x%,%y%
  226.         index++
  227.     }
  228. }
  229. Move_Function(x,y){
  230.     CoordMode,Mouse,Screen
  231.     MouseMove,x,y,0
  232. }
  233. Send_Function(SS){
  234.     SetKeyDelay,%Key_Delay%
  235.     Send,% SS
  236. }
  237. Start_Search(){
  238.     Stop:=0
  239.     if(!SortCommandList())
  240.         return
  241.     GuiControlGet,Color_Edit,1:,Color_Edit
  242.     GuiControlGet,Variation,1:,Variation
  243.     While(!Stop){
  244.         PixelSearch,px,py,X_Pos,Y_Pos,cx2,cy2,Color_Edit,Variation,Fast|RGB
  245.         if(!ErrorLevel&&Truth[1].State=1){
  246.             if(CMove=1)
  247.                 Click_Function(px+XOff,py+YOff,CTimes,TypeC)
  248.             else if(CMove=0&&CTimes>=1)
  249.                 Move_Function(px+XOff,py+YOff)
  250.             if(Send_Stuff)
  251.                 Send_Function(Send_Stuff)
  252.             if(RTimes=0){
  253.                 Stop:=1
  254.                 return
  255.             }
  256.             Sleep,% Delay
  257.         }else if(ErrorLevel=1&&Truth[2].State=1){
  258.             if(Send_Stuff)
  259.                 Send_Function(Send_Stuff)
  260.             if(RTimes=0){
  261.                 Stop:=1
  262.                 return
  263.             }
  264.             Sleep,% Delay
  265.         }
  266.     }
  267. }
  268. Stop_Search(){
  269.     Stop:=1
  270. }
  271. #If (Pos_Setting_Active=1)
  272. *Lbutton::
  273.     if(TL=1)
  274.         TL:=2
  275.     else if(TL=2&&OB=0){
  276.         Gui,3:Destroy
  277.         Pos_Setting_Active:=0
  278.         SetTimer,Draw_Cross,Off
  279.     }
  280.     return
  281. #If
  282. Run_Hotkey_Window(){
  283.     static HKWindow:={}
  284.     Stop:=1
  285.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  286.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  287.         return
  288.     if(!HKWindow.Hwnd){
  289.         HKWindow := New Custom_Window( x:= 0 , y:= 0 , w:= 300 , h:= 250 , Name:= "6" , Options:= "+AlwaysOnTop -Caption -DPIScale +Owner1" , Title:= "Command Window" , Background_Bitmap:= HotkeyWindow() )
  290.         Gui,6:Add,Text,x50 y6 w200 h26 BackgroundTrans gMove_Window
  291.         Gui,6:Add,Hotkey,x60 y125 w140 h22 vStart_Key,% Start_Key
  292.         Gui,6:Add,Hotkey,x60 y162 w140 h22 vStop_Key,% Stop_Key
  293.         HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=208  , y:=123 , w:=70  , h := 28 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "Update" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "6" , Label := "UpdateStartKey" , Default_Button := 0 , Roundness:=2 ) )
  294.         HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=208  , y:=160 , w:=70  , h := 28 , Button_Color := "22005C" , Button_Background_Color := "333333" , Text := "Update" , Font := "Arial" , Font_Size := 10 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "6" , Label := "UpdateStopKey" , Default_Button := 0 , Roundness:=2 ) )
  295.         HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=50  , y:=195 , w:=200  , h := 40 , Button_Color := "22005C" , Button_Background_Color := "252525" , Text := "OK" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "6" , Label := "CloseHKWindow" , Default_Button := 0 , Roundness:=2 ) )
  296.     }
  297.     HKWindow.Show_Window()
  298. }
  299. CloseHKWindow(){
  300.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  301.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  302.         return
  303.     Gui,6:Hide
  304. }
  305. UpdateStartKey(){
  306.     Stop:=1
  307.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  308.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  309.         return
  310.     GuiControlGet,New_Key,6:,Start_Key
  311.     if(New_Key!=Start_Key&&New_Key!=null){
  312.         Hotkey,%Start_Key%,Start_Search,Off
  313.         Hotkey,% Start_Key:=New_Key,Start_Search,On
  314.     }
  315. }
  316. UpdateStopKey(){
  317.     Stop:=1
  318.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  319.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  320.         return
  321.     GuiControlGet,New_Key,6:,Stop_Key
  322.     if(New_Key!=Stop_Key&&New_Key!=null){
  323.         Hotkey,%Stop_Key%,Stop_Search,Off
  324.         Hotkey,% Stop_Key:=New_Key,Stop_Search,On
  325.     }
  326. }
  327. Run_Command_Window(){
  328.     static CommandWindow:={}
  329.     Stop:=1
  330.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  331.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  332.         return
  333.     if(!CommandWindow.Hwnd){
  334.         CommandWindow := New Custom_Window( x:= 0 , y:= 0 , w:= 400 , h:= 500 , Name:= "5" , Options:= "+AlwaysOnTop -Caption -DPIScale +Owner1" , Title:= "Command Window" , Background_Bitmap:= CommandWindow() )
  335.         Gui,5:Add,Text,x50 y6 w300 h29 BackgroundTrans gMove_Window
  336.         HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=100  , y:=440 , w:=200  , h := 40 , Button_Color := "22005C" , Button_Background_Color := "252525" , Text := "OK" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "aaaaaa" , Font_Color_Bottom := "000000" , Window := "5" , Label := "CloseCommandWindow" , Default_Button := 0 , Roundness:=5 ) )
  337.     }
  338.     CommandWindow.Show_Window()
  339. }
  340. CloseCommandWindow(){
  341.     GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  342.     if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  343.         return
  344.     Gui,5:Hide
  345. }
  346. class Flat_Round_Radio_Type_1   {
  347.     __New(x,y,w:=19,Text:="Text",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="36373A",HighLightColor:="1A1C1F",State:=0,GroupArray:=""){
  348.         This.State:=State,This.X:=x,This.Y:=y,This.W:=W,This.H:=19,This.Text:=Text,This.Font:=Font,This.FontSize:=FontSize,This.FontColor:="0xFF" FontColor
  349.         This.HighLightColor:= "0xFF" HighLightColor,This.GroupArray:=GroupArray,This.Name:=This.GroupArray.Length()+1,This.Background_Color:="0xFF" Background_Color,This.Window:=Window
  350.         This.Create_Off_Bitmap(),This.Create_On_Bitmap(),This.Create_Trigger()
  351.         sleep,20
  352.         if(This.State)
  353.             This.Draw_On()
  354.         else
  355.             This.Draw_Off()
  356.         udb := THIS.UpdateValue.BIND( THIS )
  357.         SetTimer,% udb,-100
  358.     }
  359.     Create_Trigger(){
  360.         Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " 0xE hwndHwnd"
  361.         This.Hwnd:=hwnd
  362.         BD := THIS.Switch_State.BIND( THIS )
  363.         GUICONTROL +G , % This.Hwnd , % BD
  364.     }
  365.     Create_Off_Bitmap(){
  366.         ;Bitmap Created Using: HB Bitmap Maker
  367.         pBitmap:=Gdip_CreateBitmap( This.W , 19 )
  368.          G := Gdip_GraphicsFromImage( pBitmap )
  369.         Gdip_SetSmoothingMode( G , 2 )
  370.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  371.         Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , 21 )
  372.         Gdip_DeleteBrush( Brush )
  373.         Brush := Gdip_BrushCreateSolid( "0xFF313436" )
  374.         Gdip_FillEllipse( G , Brush , 1 , 1 , 17 , 17 )
  375.         Gdip_DeleteBrush( Brush )
  376.         Brush := Gdip_BrushCreateSolid( "0xFF1A1C1F" )
  377.         Gdip_FillEllipse( G , Brush , 1 , 0 , 17 , 17 )
  378.         Gdip_DeleteBrush( Brush )
  379.         Brush := Gdip_CreateLineBrushFromRect( 7 , 1 , 10 , 14 , "0xFF60646A" , "0xFF393B3F" , 1 , 1 )
  380.         Gdip_FillEllipse( G , Brush , 2 , 1 , 15 , 15 )
  381.         Gdip_DeleteBrush( Brush )
  382.         Brush := Gdip_CreateLineBrushFromRect( 7 , 2 , 10 , 14 , "0xFF4A4D52" , "0xFF393B3F" , 1 , 1 )
  383.         Gdip_FillEllipse( G , Brush , 3 , 2 , 13 , 13 )
  384.         Gdip_DeleteBrush( Brush )
  385.         Brush := Gdip_BrushCreateSolid( "0xFF4D5055" )
  386.         Gdip_FillEllipse( G , Brush , 7 , 7 , 5 , 6 )
  387.         Gdip_DeleteBrush( Brush )
  388.         Brush := Gdip_BrushCreateSolid( "0xFF222325" )
  389.         Gdip_FillEllipse( G , Brush , 7 , 6 , 5 , 5 )
  390.         Gdip_DeleteBrush( Brush )
  391.         Brush := Gdip_BrushCreateSolid( This.FontColor )
  392.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c0xFF000000 x22 y-1" , This.Font , This.W-23, This.H )
  393.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c" Brush " x23 y0" , This.Font , This.W-23, This.H )
  394.         Gdip_DeleteBrush( Brush )
  395.         Gdip_DeleteGraphics( G )
  396.         This.Off_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  397.         Gdip_DisposeImage(pBitmap)
  398.     }
  399.     Create_On_Bitmap(){
  400.         ;Bitmap Created Using: HB Bitmap Maker
  401.         pBitmap:=Gdip_CreateBitmap( This.W , 19 )
  402.          G := Gdip_GraphicsFromImage( pBitmap )
  403.         Gdip_SetSmoothingMode( G , 2 )
  404.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  405.         Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , 21 )
  406.         Gdip_DeleteBrush( Brush )
  407.         Brush := Gdip_BrushCreateSolid( "0xFF484A4B" )
  408.         Gdip_FillEllipse( G , Brush , 1 , 1 , 17 , 17 )
  409.         Gdip_DeleteBrush( Brush )
  410.         Brush := Gdip_BrushCreateSolid( "0xFF1A1C1F" )
  411.         Gdip_FillEllipse( G , Brush , 1 , 0 , 17 , 17 )
  412.         Gdip_DeleteBrush( Brush )
  413.         Brush := Gdip_BrushCreateSolid( "0xFF29292F" )
  414.         Gdip_FillEllipse( G , Brush , 2 , 1 , 15 , 15 )
  415.         Gdip_DeleteBrush( Brush )
  416.         Brush := Gdip_CreateLineBrushFromRect( 5 , 1 , 10 , 14 , "0xFF2E2F31" , "0xFF333337" , 1 , 1 )
  417.         Gdip_FillEllipse( G , Brush , 3 , 2 , 13 , 13 )
  418.         Gdip_DeleteBrush( Brush )
  419.         Brush := Gdip_BrushCreateSolid( "0xFF4D5055" )
  420.         Gdip_FillEllipse( G , Brush , 7 , 7 , 5 , 5 )
  421.         Gdip_DeleteBrush( Brush )
  422.         Brush := Gdip_BrushCreateSolid( This.HighLightColor )
  423.         Gdip_FillEllipse( G , Brush , 7 , 6 , 5 , 5 )
  424.         Gdip_DeleteBrush( Brush )
  425.         Brush := Gdip_BrushCreateSolid( "0xFFA866E2" )
  426.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c0xFF000000 x22 y-1" , This.Font , This.W-23, This.H )
  427.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c0xFF000000 x24 y-1" , This.Font , This.W-23, This.H )
  428.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c0xFF000000 x22 y1" , This.Font , This.W-23, This.H )
  429.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c0xFF000000 x24 y1" , This.Font , This.W-23, This.H )
  430.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c" Brush " x23 y0" , This.Font , This.W-23, This.H )
  431.         Gdip_DeleteBrush( Brush )
  432.         Gdip_DeleteGraphics( G )
  433.         This.On_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  434.         Gdip_DisposeImage( pBitmap )
  435.     }
  436.     UpdateValue(){
  437.         Loop,% This.GroupArray.Length()
  438.             if(This.GroupArray[A_Index].State=1){
  439.                 lc:=A_Index
  440.                 Loop,% This.GroupArray.Length()
  441.                     This.GroupArray[A_Index].Value:=lc
  442.             }
  443.     }
  444.     Switch_State(){
  445.         if(This.State!=1){
  446.             This.State:=1
  447.             This.Draw_On()
  448.             Loop,% This.GroupArray.Length() {
  449.                 if(This.GroupArray[A_Index].Name!=This.Name){
  450.                     This.GroupArray[A_Index].State:=0
  451.                     This.GroupArray[A_Index].Draw_Off()
  452.                 }
  453.             }
  454.             Loop,% This.GroupArray.Length() {
  455.                 if(This.GroupArray[A_Index].State=1){
  456.                     This.Value:=A_Index
  457.                     break
  458.                 }
  459.             }
  460.             Loop,% This.GroupArray.Length() {
  461.                     This.GroupArray[A_Index].Value:=This.Value
  462.             }
  463.         }
  464.     }
  465.     Draw_Off(){
  466.         SetImage( This.Hwnd , This.Off_Bitmap )
  467.     }
  468.     Draw_On(){
  469.         SetImage( This.Hwnd , This.On_Bitmap )
  470.     }
  471. }
  472. HB_Button_Hover(){
  473.     Static Index , Hover_On
  474.     MouseGetPos,,,, ctrl , 2
  475.     if( ! Hover_On && ctrl ){
  476.         loop , % HB_Button.Length()
  477.             if( ctrl = HB_Button[ A_Index ].hwnd )
  478.                 HB_Button[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On := 1 , break
  479.     }else if( Hover_On = 1 )
  480.         if( ctrl != HB_Button[ Index ].Hwnd )
  481.             HB_Button[ Index ].Draw_Default() , Hover_On := 0
  482. }
  483. class HB_Flat_Rounded_Button_Type_1 {
  484.     __New( x := 10 , y := 10 , w := 150 , h := 40 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "Button" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "FFFFFF" , Window := "1" , Label := "" , Default_Button := 1, Roundness:=5 ){
  485.         This.Roundness:=Roundness,This.Text_Color_Top := "0xFF" Font_Color_Top,This.Text_Color_Bottom := "0xFF" Font_Color_Bottom,This.Font := Font
  486.         This.Font_Size := Font_Size,This.Text := Text,This.X:=x,This.Y:=y,This.W := w,This.H := h
  487.         This.Button_Background_Color := "0xFF" Button_Background_Color,This.Button_Color := "0xFF" Button_Color,This.Window := Window,This.Label := Label
  488.         This.Default_Button := Default_Button,This.Create_Default_Bitmap(),This.Create_Hover_Bitmap(),This.Create_Pressed_Bitmap(),This.Create_Trigger()
  489.         sleep, 20
  490.         This.Draw_Default()
  491.     }
  492.     Create_Trigger(){
  493.         global
  494.         num := HB_Button.Length()+1
  495.         Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  496.         This.Number := Num , This.Hwnd := Hwnd
  497.     }
  498.     Create_Default_Bitmap(){
  499.         ;Bitmap Created Using: HB Bitmap Maker
  500.         pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  501.          G := Gdip_GraphicsFromImage( pBitmap )
  502.         Gdip_SetSmoothingMode( G , 2 )
  503.         Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  504.         Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  505.         Gdip_DeleteBrush( Brush )
  506.         Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  507.         Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  508.         Gdip_DeleteBrush( Brush )
  509.         if(This.Default_Button)
  510.             Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 )
  511.         else    
  512.             Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.Button_Color , "0xFF222222" , 1 , 1 )
  513.         Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  514.         Gdip_DeleteBrush( Brush )
  515.         Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  516.         Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  517.         Gdip_DeletePen( Pen )
  518.         Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  519.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2 " , This.Font , This.W , This.H-1 )
  520.         Gdip_DeleteBrush( Brush )
  521.         Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  522.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1 " , This.Font , This.W , This.H-1 )
  523.         Gdip_DeleteBrush( Brush )
  524.         Gdip_DeleteGraphics( G )
  525.         This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  526.         Gdip_DisposeImage(pBitmap)
  527.     }
  528.     Create_Hover_Bitmap(){
  529.         ;Bitmap Created Using: HB Bitmap Maker
  530.         pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  531.          G := Gdip_GraphicsFromImage( pBitmap )
  532.         Gdip_SetSmoothingMode( G , 2 )
  533.         Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  534.         Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  535.         Gdip_DeleteBrush( Brush )
  536.         Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  537.         Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  538.         Gdip_DeleteBrush( Brush )
  539.         if(This.Default_Button)
  540.             Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF55585D" , "0xFF3B3E41" , 1 , 1 )
  541.         else
  542.             Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xff620096" , "0xFF333333" , 1 , 1 )
  543.         Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  544.         Gdip_DeleteBrush( Brush )
  545.         Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  546.         Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  547.         Gdip_DeletePen( Pen )
  548.         Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  549.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2" , This.Font , This.W , This.H-1 )
  550.         Gdip_DeleteBrush( Brush )
  551.         Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  552.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1" , This.Font , This.W , This.H-1 )
  553.         Gdip_DeleteBrush( Brush )
  554.         Gdip_DeleteGraphics( G )
  555.         This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  556.         Gdip_DisposeImage(pBitmap)
  557.     }
  558.     Create_Pressed_Bitmap(){
  559.         pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  560.          G := Gdip_GraphicsFromImage( pBitmap )
  561.         Gdip_SetSmoothingMode( G , 2 )
  562.         Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  563.         Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  564.         Gdip_DeleteBrush( Brush )
  565.         Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF2A2C2E" , "0xFF45474E" , 1 , 1 )
  566.         Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  567.         Gdip_DeleteBrush( Brush )
  568.         Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" )
  569.         Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H-8 , This.Roundness )
  570.         Gdip_DeleteBrush( Brush )
  571.         Brush := Gdip_BrushCreateSolid( "0xFF46474D" )
  572.         Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , This.W , This.H-8 , This.Roundness )
  573.         Gdip_DeleteBrush( Brush )
  574.         Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF111111" , "0xFF610094" , 1 , 1 )
  575.         Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-3 , This.H-6 , This.Roundness )
  576.         Gdip_DeleteBrush( Brush )
  577.         Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  578.         Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  579.         Gdip_DeletePen( Pen )
  580.         Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  581.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y3" , This.Font , This.W , This.H-1 )
  582.         Gdip_DeleteBrush( Brush )
  583.         Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  584.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y2" , This.Font , This.W , This.H-1 )
  585.         Gdip_DeleteBrush( Brush )
  586.         Gdip_DeleteGraphics( G )
  587.         This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  588.         Gdip_DisposeImage( pBitmap )
  589.     }
  590.     Draw_Default(){
  591.         SetImage( This.Hwnd , This.Default_Bitmap )
  592.     }
  593.     Draw_Hover(){
  594.         SetImage( This.Hwnd , This.Hover_Bitmap )
  595.     }
  596.     Draw_Pressed(){
  597.         SetImage( This.Hwnd , This.Pressed_Bitmap )
  598.         SetTimer , HB_Button_Hover , Off
  599.         While( GetKeyState( "LButton" ) )
  600.             sleep , 10
  601.         SetTimer , HB_Button_Hover , On
  602.         MouseGetPos,,,, ctrl , 2
  603.         if( This.Hwnd != ctrl ){
  604.             This.Draw_Default()
  605.             return False
  606.         }else   {
  607.             This.Draw_Hover()
  608.             return true
  609.         }
  610.     }
  611. }
  612. Class Custom_Window {
  613.     __New(x:="",y:="",w:=300,h:=200,Name:=1,Options:="+AlwaysOnTop -Caption -DPIScale",Title:="",Background_Bitmap:=""){
  614.         This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Name:=Name,This.Title:=Title,This.Options:=Options,This.Background_Bitmap:=Background_Bitmap,This.Create_Window()
  615.     }
  616.     Create_Window(){
  617.         Gui,% This.Name ":New",%  This.Options " +LastFound"
  618.         This.Hwnd:=WinExist()
  619.         if(This.Background_Bitmap)
  620.             This.Draw_Background_Bitmap()
  621.     }
  622.     Draw_Background_Bitmap(){
  623.         This.Bitmap:=Gdip_CreateHBITMAPFromBitmap(This.Background_Bitmap)
  624.         Gdip_DisposeImage(This.Background_Bitmap)
  625.         Gui,% This.Name ":Add",Picture,% "x0 y0 w" This.W " h" This.H " 0xE hwndhwnd"
  626.         This.Background_Hwnd:=hwnd
  627.         SetImage(This.Background_Hwnd,This.Bitmap)
  628.     }
  629.     Show_Window(){
  630.         if(This.X&&This.Y)
  631.             Gui,% This.Name ":Show",% "x" This.X " y" This.Y " w" This.W " h" This.H,% This.Title
  632.         else if(This.X&&!This.Y)
  633.             Gui,% This.Name ":Show",% "x" This.X  " w" This.W " h" This.H,% This.Title
  634.         else if(!This.X&&This.Y)
  635.             Gui,% This.Name ":Show",% "y" This.Y  " w" This.W " h" This.H,% This.Title
  636.         else
  637.             Gui,% This.Name ":Show",% " w" This.W " h" This.H,% This.Title
  638.     }
  639. }
  640. PixelPredatorBG(){
  641.     ;Bitmap Created Using: HB Bitmap Maker
  642.     pBitmap:=Gdip_CreateBitmap( 450 , 300 )
  643.      G := Gdip_GraphicsFromImage( pBitmap )
  644.     Gdip_SetSmoothingMode( G , 4 )
  645.     Brush := Gdip_CreateLineBrush( 66 , 77 , 100 , 100 , "0xFF111111" , "0xFF22005E" , 1 )
  646.     Gdip_FillRectangle( G , Brush , -2 , -2 , 454 , 303 )
  647.     Gdip_DeleteBrush( Brush )
  648.     Brush := Gdip_BrushCreateSolid( "0xFF252525" )
  649.     Gdip_FillRectangle( G , Brush , 10 , 40 , 430 , 250 )
  650.     Gdip_DeleteBrush( Brush )
  651.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  652.     Gdip_DrawRectangle( G , Pen , 0 , 0 , 449 , 299 )
  653.     Gdip_DeletePen( Pen )
  654.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  655.     Gdip_DrawRectangle( G , Pen , 10 , 40 , 430 , 250 )
  656.     Gdip_DeletePen( Pen )
  657.     Brush := Gdip_CreateLineBrush( 14 , 9 , 21 , 22 , "0xFF7200AE" , "0xFF010101" , 1 )
  658.     Gdip_FillRectangle( G , Brush , 5 , 5 , 30 , 30 )
  659.     Gdip_DeleteBrush( Brush )
  660.     Brush := Gdip_CreateLineBrush( 154 , 9 , 182 , 47 , "0xFF7200AE" , "0xFF010101" , 1 )
  661.     Gdip_FillRectangle( G , Brush , 85 , 6 , 280 , 28 )
  662.     Gdip_DeleteBrush( Brush )
  663.     Brush := Gdip_CreateLineBrush( 412 , 8 , 418 , 15 , "0xFF7200AE" , "0xFF010101" , 1 )
  664.     Gdip_FillRectangle( G , Brush , 409 , 6 , 15 , 15 )
  665.     Gdip_DeleteBrush( Brush )
  666.     Brush := Gdip_CreateLineBrush( 433 , 9 , 437 , 16 , "0xFF7200AE" , "0xFF010101" , 1 )
  667.     Gdip_FillRectangle( G , Brush , 429 , 6 , 15 , 15 )
  668.     Gdip_DeleteBrush( Brush )
  669.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  670.     Gdip_DrawRectangle( G , Pen , 5 , 5 , 30 , 30 )
  671.     Gdip_DeletePen( Pen )
  672.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  673.     Gdip_DrawRectangle( G , Pen , 85 , 6 , 280 , 28 )
  674.     Gdip_DeletePen( Pen )
  675.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  676.     Gdip_DrawRectangle( G , Pen , 409 , 6 , 15 , 15 )
  677.     Gdip_DeletePen( Pen )
  678.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  679.     Gdip_DrawRectangle( G , Pen , 429 , 6 , 15 , 15 )
  680.     Gdip_DeletePen( Pen )
  681.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  682.     Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x-5 y-4" , "Arial" , 50 , 50 )
  683.     Gdip_DeleteBrush( Brush )
  684.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  685.     Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x-4 y-3" , "Arial" , 50 , 50 )
  686.     Gdip_DeleteBrush( Brush )
  687.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  688.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x84 y5" , "Segoe UI" , 280 , 28 )
  689.     Gdip_DeleteBrush( Brush )
  690.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  691.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y5" , "Segoe UI" , 280 , 28 )
  692.     Gdip_DeleteBrush( Brush )
  693.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  694.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x86 y5" , "Segoe UI" , 280 , 28 )
  695.     Gdip_DeleteBrush( Brush )
  696.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  697.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x86 y6" , "Segoe UI" , 280 , 28 )
  698.     Gdip_DeleteBrush( Brush )
  699.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  700.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y6" , "Segoe UI" , 280 , 28 )
  701.     Gdip_DeleteBrush( Brush )
  702.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  703.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x84 y6" , "Segoe UI" , 280 , 28 )
  704.     Gdip_DeleteBrush( Brush )
  705.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  706.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x84 y7" , "Segoe UI" , 280 , 28 )
  707.     Gdip_DeleteBrush( Brush )
  708.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  709.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y7" , "Segoe UI" , 280 , 28 )
  710.     Gdip_DeleteBrush( Brush )
  711.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  712.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x86 y7" , "Segoe UI" , 280 , 28 )
  713.     Gdip_DeleteBrush( Brush )
  714.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  715.     Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y6" , "Segoe UI" , 280 , 28 )
  716.     Gdip_DeleteBrush( Brush )
  717.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  718.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x392 y-16" , "Arial" , 50 , 50 )
  719.     Gdip_DeleteBrush( Brush )
  720.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  721.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-16" , "Arial" , 50 , 50 )
  722.     Gdip_DeleteBrush( Brush )
  723.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  724.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x394 y-16" , "Arial" , 50 , 50 )
  725.     Gdip_DeleteBrush( Brush )
  726.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  727.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x394 y-15" , "Arial" , 50 , 50 )
  728.     Gdip_DeleteBrush( Brush )
  729.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  730.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-15" , "Arial" , 50 , 50 )
  731.     Gdip_DeleteBrush( Brush )
  732.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  733.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x392 y-15" , "Arial" , 50 , 50 )
  734.     Gdip_DeleteBrush( Brush )
  735.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  736.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x392 y-14" , "Arial" , 50 , 50 )
  737.     Gdip_DeleteBrush( Brush )
  738.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  739.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-14" , "Arial" , 50 , 50 )
  740.     Gdip_DeleteBrush( Brush )
  741.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  742.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x394 y-14" , "Arial" , 50 , 50 )
  743.     Gdip_DeleteBrush( Brush )
  744.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  745.     Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-15" , "Arial" , 50 , 50 )
  746.     Gdip_DeleteBrush( Brush )
  747.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  748.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x412 y-12" , "Arial" , 50 , 50 )
  749.     Gdip_DeleteBrush( Brush )
  750.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  751.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-12" , "Arial" , 50 , 50 )
  752.     Gdip_DeleteBrush( Brush )
  753.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  754.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x414 y-12" , "Arial" , 50 , 50 )
  755.     Gdip_DeleteBrush( Brush )
  756.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  757.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x414 y-11" , "Arial" , 50 , 50 )
  758.     Gdip_DeleteBrush( Brush )
  759.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  760.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-11" , "Arial" , 50 , 50 )
  761.     Gdip_DeleteBrush( Brush )
  762.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  763.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x412 y-11" , "Arial" , 50 , 50 )
  764.     Gdip_DeleteBrush( Brush )
  765.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  766.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x412 y-10" , "Arial" , 50 , 50 )
  767.     Gdip_DeleteBrush( Brush )
  768.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  769.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-10" , "Arial" , 50 , 50 )
  770.     Gdip_DeleteBrush( Brush )
  771.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  772.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x414 y-10" , "Arial" , 50 , 50 )
  773.     Gdip_DeleteBrush( Brush )
  774.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  775.     Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-11" , "Arial" , 50 , 50 )
  776.     Gdip_DeleteBrush( Brush )
  777.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  778.     Gdip_DrawLine( G , Pen , 449 , 0 , 449 , 300 )
  779.     Gdip_DeletePen( Pen )
  780.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  781.     Gdip_DrawLine( G , Pen , 0 , 299 , 449 , 299 )
  782.     Gdip_DeletePen( Pen )
  783.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  784.     Gdip_DrawLine( G , Pen , 11 , 290 , 440 , 290 )
  785.     Gdip_DeletePen( Pen )
  786.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  787.     Gdip_DrawLine( G , Pen , 440 , 40 , 440 , 289 )
  788.     Gdip_DeletePen( Pen )
  789.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  790.     Gdip_DrawLine( G , Pen , 35 , 5 , 35 , 35 )
  791.     Gdip_DeletePen( Pen )
  792.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  793.     Gdip_DrawLine( G , Pen , 5 , 35 , 35 , 35 )
  794.     Gdip_DeletePen( Pen )
  795.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  796.     Gdip_DrawLine( G , Pen , 85 , 34 , 365 , 34 )
  797.     Gdip_DeletePen( Pen )
  798.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  799.     Gdip_DrawLine( G , Pen , 365 , 6 , 365 , 34 )
  800.     Gdip_DeletePen( Pen )
  801.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  802.     Gdip_DrawLine( G , Pen , 424 , 6 , 424 , 21 )
  803.     Gdip_DeletePen( Pen )
  804.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  805.     Gdip_DrawLine( G , Pen , 444 , 6 , 444 , 21 )
  806.     Gdip_DeletePen( Pen )
  807.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  808.     Gdip_DrawLine( G , Pen , 429 , 21 , 444 , 21 )
  809.     Gdip_DeletePen( Pen )
  810.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  811.     Gdip_DrawLine( G , Pen , 409 , 21 , 424 , 21 )
  812.     Gdip_DeletePen( Pen )
  813.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  814.     Gdip_FillRectangle( G , Brush , 16 , 45 , 419 , 40 )
  815.     Gdip_DeleteBrush( Brush )
  816.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  817.     Gdip_DrawRectangle( G , Pen , 15 , 45 , 420 , 40 )
  818.     Gdip_DeletePen( Pen )
  819.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  820.     Gdip_FillRectangle( G , Brush , 16 , 90 , 419 , 40 )
  821.     Gdip_DeleteBrush( Brush )
  822.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  823.     Gdip_DrawRectangle( G , Pen , 15 , 90 , 420 , 40 )
  824.     Gdip_DeletePen( Pen )
  825.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  826.     Gdip_FillRectangle( G , Brush , 16 , 135 , 159 , 40 )
  827.     Gdip_DeleteBrush( Brush )
  828.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  829.     Gdip_DrawRectangle( G , Pen , 15 , 135 , 160 , 40 )
  830.     Gdip_DeletePen( Pen )
  831.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  832.     Gdip_FillRectangle( G , Brush , 16 , 180 , 419 , 40 )
  833.     Gdip_DeleteBrush( Brush )
  834.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  835.     Gdip_DrawRectangle( G , Pen , 15 , 180 , 420 , 40 )
  836.     Gdip_DeletePen( Pen )
  837.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  838.     Gdip_DrawLine( G , Pen , 15 , 85 , 435 , 85 )
  839.     Gdip_DeletePen( Pen )
  840.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  841.     Gdip_DrawLine( G , Pen , 15 , 130 , 435 , 130 )
  842.     Gdip_DeletePen( Pen )
  843.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  844.     Gdip_DrawLine( G , Pen , 15 , 175 , 175 , 175 )
  845.     Gdip_DeletePen( Pen )
  846.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  847.     Gdip_DrawLine( G , Pen , 15 , 220 , 435 , 220 )
  848.     Gdip_DeletePen( Pen )
  849.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  850.     Gdip_DrawLine( G , Pen , 435 , 45 , 435 , 84 )
  851.     Gdip_DeletePen( Pen )
  852.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  853.     Gdip_DrawLine( G , Pen , 435 , 90 , 435 , 129 )
  854.     Gdip_DeletePen( Pen )
  855.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  856.     Gdip_DrawLine( G , Pen , 175 , 135 , 175 , 174 )
  857.     Gdip_DeletePen( Pen )
  858.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  859.     Gdip_DrawLine( G , Pen , 435 , 180 , 435 , 219 )
  860.     Gdip_DeletePen( Pen )
  861.     Pen := Gdip_CreatePen( "0xFF000000" , 3 )
  862.     Gdip_DrawEllipse( G , Pen , 290 , 12 , 15 , 15 )
  863.     Gdip_DeletePen( Pen )
  864.     Pen := Gdip_CreatePen( "0xFFF0F0F0" , 1 )
  865.     Gdip_DrawEllipse( G , Pen , 290 , 12 , 15 , 15 )
  866.     Gdip_DeletePen( Pen )
  867.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  868.     Gdip_FillRectangle( G , Brush , 296 , 7 , 3 , 10 )
  869.     Gdip_DeleteBrush( Brush )
  870.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  871.     Gdip_FillRectangle( G , Brush , 296 , 22 , 3 , 10 )
  872.     Gdip_DeleteBrush( Brush )
  873.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  874.     Gdip_FillRectangle( G , Brush , 285 , 18 , 10 , 3 )
  875.     Gdip_DeleteBrush( Brush )
  876.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  877.     Gdip_FillRectangle( G , Brush , 300 , 18 , 10 , 3 )
  878.     Gdip_DeleteBrush( Brush )
  879.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  880.     Gdip_FillRectangle( G , Brush , 297 , 8 , 1 , 8 )
  881.     Gdip_DeleteBrush( Brush )
  882.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  883.     Gdip_FillRectangle( G , Brush , 297 , 23 , 1 , 8 )
  884.     Gdip_DeleteBrush( Brush )
  885.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  886.     Gdip_FillRectangle( G , Brush , 301 , 19 , 8 , 1 )
  887.     Gdip_DeleteBrush( Brush )
  888.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  889.     Gdip_FillRectangle( G , Brush , 286 , 19 , 8 , 1 )
  890.     Gdip_DeleteBrush( Brush )
  891.     Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
  892.     Gdip_FillRectangle( G , Brush , 297 , 19 , 2 , 2 )
  893.     Gdip_DeleteBrush( Brush )
  894.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  895.     Gdip_TextToGraphics( G , "Var:" , "s12 Center vCenter Bold c" Brush " x319 y41" , "Arial" , 50 , 50 )
  896.     Gdip_DeleteBrush( Brush )
  897.     Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
  898.     Gdip_TextToGraphics( G , "Var:" , "s12 Center vCenter Bold c" Brush " x320 y42" , "Arial" , 50 , 50 )
  899.     Gdip_DeleteBrush( Brush )
  900.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  901.     Gdip_TextToGraphics( G , "X:" , "s12 Center vCenter Bold c" Brush " x136 y86" , "Arial" , 50 , 50 )
  902.     Gdip_DeleteBrush( Brush )
  903.     Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
  904.     Gdip_TextToGraphics( G , "X:" , "s12 Center vCenter Bold c" Brush " x137 y87" , "Arial" , 50 , 50 )
  905.     Gdip_DeleteBrush( Brush )
  906.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  907.     Gdip_TextToGraphics( G , "Y:" , "s12 Center vCenter Bold c" Brush " x206 y86" , "Arial" , 50 , 50 )
  908.     Gdip_DeleteBrush( Brush )
  909.     Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
  910.     Gdip_TextToGraphics( G , "Y:" , "s12 Center vCenter Bold c" Brush " x207 y87" , "Arial" , 50 , 50 )
  911.     Gdip_DeleteBrush( Brush )
  912.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  913.     Gdip_TextToGraphics( G , "W:" , "s12 Center vCenter Bold c" Brush " x275 y86" , "Arial" , 50 , 50 )
  914.     Gdip_DeleteBrush( Brush )
  915.     Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
  916.     Gdip_TextToGraphics( G , "W:" , "s12 Center vCenter Bold c" Brush " x276 y87" , "Arial" , 50 , 50 )
  917.     Gdip_DeleteBrush( Brush )
  918.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  919.     Gdip_TextToGraphics( G , "H:" , "s12 Center vCenter Bold c" Brush " x345 y86" , "Arial" , 50 , 50 )
  920.     Gdip_DeleteBrush( Brush )
  921.     Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
  922.     Gdip_TextToGraphics( G , "H:" , "s12 Center vCenter Bold c" Brush " x346 y87" , "Arial" , 50 , 50 )
  923.     Gdip_DeleteBrush( Brush )
  924.     Gdip_DeleteGraphics( G )
  925.     return pBitmap
  926. }
  927. CommandWindow(){
  928.     ;Bitmap Created Using: HB Bitmap Maker
  929.     pBitmap:=Gdip_CreateBitmap( 400 , 500 )
  930.      G := Gdip_GraphicsFromImage( pBitmap )
  931.     Gdip_SetSmoothingMode( G , 4 )
  932.     Brush := Gdip_CreateLineBrush( 49 , 40 , 112 , 82 , "0xFF111111" , "0xFF22005E" , 1 )
  933.     Gdip_FillRectangle( G , Brush , -1 , -1 , 404 , 504 )
  934.     Gdip_DeleteBrush( Brush )
  935.     Brush := Gdip_BrushCreateSolid( "0xFF252525" )
  936.     Gdip_FillRectangle( G , Brush , 10 , 40 , 380 , 450 )
  937.     Gdip_DeleteBrush( Brush )
  938.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  939.     Gdip_DrawRectangle( G , Pen , 0 , 0 , 399 , 499 )
  940.     Gdip_DeletePen( Pen )
  941.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  942.     Gdip_DrawRectangle( G , Pen , 10 , 40 , 380 , 450 )
  943.     Gdip_DeletePen( Pen )
  944.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  945.     Gdip_DrawLine( G , Pen , 399 , 0 , 399 , 499 )
  946.     Gdip_DeletePen( Pen )
  947.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  948.     Gdip_DrawLine( G , Pen , 0 , 499 , 399 , 499 )
  949.     Gdip_DeletePen( Pen )
  950.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  951.     Gdip_DrawLine( G , Pen , 390 , 40 , 390 , 490 )
  952.     Gdip_DeletePen( Pen )
  953.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  954.     Gdip_DrawLine( G , Pen , 10 , 490 , 390 , 490 )
  955.     Gdip_DeletePen( Pen )
  956.     Brush := Gdip_CreateLineBrush( 76 , 6 , 118 , 59 , "0xFF7100AD" , "0xFF000000" , 1 )
  957.     Gdip_FillRectangle( G , Brush , 50 , 6 , 300 , 29 )
  958.     Gdip_DeleteBrush( Brush )
  959.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  960.     Gdip_DrawRectangle( G , Pen , 50 , 6 , 300 , 29 )
  961.     Gdip_DeletePen( Pen )
  962.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  963.     Gdip_DrawLine( G , Pen , 50 , 35 , 350 , 35 )
  964.     Gdip_DeletePen( Pen )
  965.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  966.     Gdip_DrawLine( G , Pen , 350 , 7 , 350 , 34 )
  967.     Gdip_DeletePen( Pen )
  968.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  969.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x49 y7" , "Arial" , 300 , 30 )
  970.     Gdip_DeleteBrush( Brush )
  971.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  972.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x50 y7" , "Arial" , 300 , 30 )
  973.     Gdip_DeleteBrush( Brush )
  974.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  975.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x51 y7" , "Arial" , 300 , 30 )
  976.     Gdip_DeleteBrush( Brush )
  977.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  978.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x51 y8" , "Arial" , 300 , 30 )
  979.     Gdip_DeleteBrush( Brush )
  980.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  981.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x50 y8" , "Arial" , 300 , 30 )
  982.     Gdip_DeleteBrush( Brush )
  983.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  984.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x49 y8" , "Arial" , 300 , 30 )
  985.     Gdip_DeleteBrush( Brush )
  986.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  987.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x49 y9" , "Arial" , 300 , 30 )
  988.     Gdip_DeleteBrush( Brush )
  989.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  990.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x50 y9" , "Arial" , 300 , 30 )
  991.     Gdip_DeleteBrush( Brush )
  992.     Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
  993.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x51 y9" , "Arial" , 300 , 30 )
  994.     Gdip_DeleteBrush( Brush )
  995.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  996.     Gdip_TextToGraphics( G , "Command Line Format" , "s16 Center vCenter Bold c" Brush " x50 y8" , "Arial" , 300 , 30 )
  997.     Gdip_DeleteBrush( Brush )
  998.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  999.     Gdip_FillRectangle( G , Brush , 51 , 51 , 298 , 50 )
  1000.     Gdip_DeleteBrush( Brush )
  1001.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1002.     Gdip_DrawRectangle( G , Pen , 52 , 52 , 297 , 49 )
  1003.     Gdip_DeletePen( Pen )
  1004.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1005.     Gdip_DrawLine( G , Pen , 52 , 101 , 349 , 101 )
  1006.     Gdip_DeletePen( Pen )
  1007.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1008.     Gdip_DrawLine( G , Pen , 349 , 52 , 349 , 101 )
  1009.     Gdip_DeletePen( Pen )
  1010.     Brush := Gdip_BrushCreateSolid( "0xFF7200AD" )
  1011.     Gdip_TextToGraphics( G , "Format" , "s16 Center vCenter Bold c" Brush " x50 y47" , "Segoe UI" , 298 , 30 )
  1012.     Gdip_DeleteBrush( Brush )
  1013.     Brush := Gdip_BrushCreateSolid( "0xFF7200AD" )
  1014.     Gdip_TextToGraphics( G , "Format" , "s16 Center vCenter Bold c" Brush " x52 y47" , "Segoe UI" , 298 , 30 )
  1015.     Gdip_DeleteBrush( Brush )
  1016.     Brush := Gdip_BrushCreateSolid( "0xFF7200AD" )
  1017.     Gdip_TextToGraphics( G , "Format" , "s16 Center vCenter Bold c" Brush " x52 y49" , "Segoe UI" , 298 , 30 )
  1018.     Gdip_DeleteBrush( Brush )
  1019.     Brush := Gdip_BrushCreateSolid( "0xFF7200AD" )
  1020.     Gdip_TextToGraphics( G , "Format" , "s16 Center vCenter Bold c" Brush " x50 y49" , "Segoe UI" , 298 , 30 )
  1021.     Gdip_DeleteBrush( Brush )
  1022.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1023.     Gdip_TextToGraphics( G , "Format" , "s16 Center vCenter Bold c" Brush " x51 y48" , "Segoe UI" , 298 , 30 )
  1024.     Gdip_DeleteBrush( Brush )
  1025.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1026.     Gdip_TextToGraphics( G , "_________" , "s16 Center vCenter Bold c" Brush " x51 y50" , "Segoe UI" , 298 , 30 )
  1027.     Gdip_DeleteBrush( Brush )
  1028.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1029.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x50 y70" , "Segoe UI" , 298 , 30 )
  1030.     Gdip_DeleteBrush( Brush )
  1031.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1032.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x51 y70" , "Segoe UI" , 298 , 30 )
  1033.     Gdip_DeleteBrush( Brush )
  1034.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1035.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x52 y70" , "Segoe UI" , 298 , 30 )
  1036.     Gdip_DeleteBrush( Brush )
  1037.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1038.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x52 y71" , "Segoe UI" , 298 , 30 )
  1039.     Gdip_DeleteBrush( Brush )
  1040.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1041.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x51 y71" , "Segoe UI" , 298 , 30 )
  1042.     Gdip_DeleteBrush( Brush )
  1043.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1044.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x50 y71" , "Segoe UI" , 298 , 30 )
  1045.     Gdip_DeleteBrush( Brush )
  1046.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1047.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x50 y72" , "Segoe UI" , 298 , 30 )
  1048.     Gdip_DeleteBrush( Brush )
  1049.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1050.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x51 y72" , "Segoe UI" , 298 , 30 )
  1051.     Gdip_DeleteBrush( Brush )
  1052.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1053.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x52 y72" , "Segoe UI" , 298 , 30 )
  1054.     Gdip_DeleteBrush( Brush )
  1055.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1056.     Gdip_TextToGraphics( G , "*1*2*3*4*5*6*7*8*9*10" , "s16 Center vCenter Bold c" Brush " x51 y71" , "Segoe UI" , 298 , 30 )
  1057.     Gdip_DeleteBrush( Brush )
  1058.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  1059.     Gdip_FillRectangle( G , Brush , 20 , 106 , 360 , 304 )
  1060.     Gdip_DeleteBrush( Brush )
  1061.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1062.     Gdip_DrawRectangle( G , Pen , 20 , 106 , 360 , 304 )
  1063.     Gdip_DeletePen( Pen )
  1064.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1065.     Gdip_DrawLine( G , Pen , 20 , 106 , 379 , 106 )
  1066.     Gdip_DeletePen( Pen )
  1067.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1068.     Gdip_DrawLine( G , Pen , 20 , 106 , 20 , 409 )
  1069.     Gdip_DeletePen( Pen )
  1070.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1071.     Gdip_DrawLine( G , Pen , 41 , 136 , 359 , 136 )
  1072.     Gdip_DeletePen( Pen )
  1073.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1074.     Gdip_DrawLine( G , Pen , 41 , 166 , 359 , 166 )
  1075.     Gdip_DeletePen( Pen )
  1076.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1077.     Gdip_DrawLine( G , Pen , 41 , 196 , 359 , 196 )
  1078.     Gdip_DeletePen( Pen )
  1079.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1080.     Gdip_DrawLine( G , Pen , 41 , 226 , 359 , 226 )
  1081.     Gdip_DeletePen( Pen )
  1082.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1083.     Gdip_DrawLine( G , Pen , 41 , 256 , 359 , 256 )
  1084.     Gdip_DeletePen( Pen )
  1085.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1086.     Gdip_DrawLine( G , Pen , 41 , 286 , 359 , 286 )
  1087.     Gdip_DeletePen( Pen )
  1088.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1089.     Gdip_DrawLine( G , Pen , 41 , 316 , 359 , 316 )
  1090.     Gdip_DeletePen( Pen )
  1091.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1092.     Gdip_DrawLine( G , Pen , 41 , 346 , 359 , 346 )
  1093.     Gdip_DeletePen( Pen )
  1094.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1095.     Gdip_DrawLine( G , Pen , 41 , 346 , 359 , 346 )
  1096.     Gdip_DeletePen( Pen )
  1097.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1098.     Gdip_DrawLine( G , Pen , 41 , 316 , 359 , 316 )
  1099.     Gdip_DeletePen( Pen )
  1100.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1101.     Gdip_DrawLine( G , Pen , 41 , 286 , 359 , 286 )
  1102.     Gdip_DeletePen( Pen )
  1103.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1104.     Gdip_DrawLine( G , Pen , 41 , 256 , 359 , 256 )
  1105.     Gdip_DeletePen( Pen )
  1106.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1107.     Gdip_DrawLine( G , Pen , 41 , 226 , 359 , 226 )
  1108.     Gdip_DeletePen( Pen )
  1109.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1110.     Gdip_DrawLine( G , Pen , 41 , 196 , 359 , 196 )
  1111.     Gdip_DeletePen( Pen )
  1112.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1113.     Gdip_DrawLine( G , Pen , 41 , 166 , 359 , 166 )
  1114.     Gdip_DeletePen( Pen )
  1115.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1116.     Gdip_DrawLine( G , Pen , 41 , 136 , 359 , 136 )
  1117.     Gdip_DeletePen( Pen )
  1118.     Pen := Gdip_CreatePen( "0xFF7000AC" , 3 )
  1119.     Gdip_DrawLine( G , Pen , 41 , 376 , 359 , 376 )
  1120.     Gdip_DeletePen( Pen )
  1121.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1122.     Gdip_DrawLine( G , Pen , 41 , 376 , 359 , 376 )
  1123.     Gdip_DeletePen( Pen )
  1124.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1125.     Gdip_TextToGraphics( G , "*1*" , "s16 Center vCenter Bold c" Brush " x-7 y98" , "Arial" , 90 , 50 )
  1126.     Gdip_DeleteBrush( Brush )
  1127.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1128.     Gdip_TextToGraphics( G , "*1*" , "s16 Center vCenter Bold c" Brush " x-5 y98" , "Arial" , 90 , 50 )
  1129.     Gdip_DeleteBrush( Brush )
  1130.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1131.     Gdip_TextToGraphics( G , "*1*" , "s16 Center vCenter Bold c" Brush " x-5 y100" , "Arial" , 90 , 50 )
  1132.     Gdip_DeleteBrush( Brush )
  1133.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1134.     Gdip_TextToGraphics( G , "*1*" , "s16 Center vCenter Bold c" Brush " x-7 y100" , "Arial" , 90 , 50 )
  1135.     Gdip_DeleteBrush( Brush )
  1136.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1137.     Gdip_TextToGraphics( G , "*1*" , "s16 Center vCenter Bold c" Brush " x-6 y99" , "Arial" , 90 , 50 )
  1138.     Gdip_DeleteBrush( Brush )
  1139.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1140.     Gdip_TextToGraphics( G , "*2*" , "s16 Center vCenter Bold c" Brush " x-7 y128" , "Arial" , 90 , 50 )
  1141.     Gdip_DeleteBrush( Brush )
  1142.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1143.     Gdip_TextToGraphics( G , "*2*" , "s16 Center vCenter Bold c" Brush " x-5 y128" , "Arial" , 90 , 50 )
  1144.     Gdip_DeleteBrush( Brush )
  1145.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1146.     Gdip_TextToGraphics( G , "*2*" , "s16 Center vCenter Bold c" Brush " x-5 y130" , "Arial" , 90 , 50 )
  1147.     Gdip_DeleteBrush( Brush )
  1148.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1149.     Gdip_TextToGraphics( G , "*2*" , "s16 Center vCenter Bold c" Brush " x-7 y130" , "Arial" , 90 , 50 )
  1150.     Gdip_DeleteBrush( Brush )
  1151.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1152.     Gdip_TextToGraphics( G , "*2*" , "s16 Center vCenter Bold c" Brush " x-6 y129" , "Arial" , 90 , 50 )
  1153.     Gdip_DeleteBrush( Brush )
  1154.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1155.     Gdip_TextToGraphics( G , "*3*" , "s16 Center vCenter Bold c" Brush " x-7 y158" , "Arial" , 90 , 50 )
  1156.     Gdip_DeleteBrush( Brush )
  1157.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1158.     Gdip_TextToGraphics( G , "*3*" , "s16 Center vCenter Bold c" Brush " x-5 y158" , "Arial" , 90 , 50 )
  1159.     Gdip_DeleteBrush( Brush )
  1160.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1161.     Gdip_TextToGraphics( G , "*3*" , "s16 Center vCenter Bold c" Brush " x-5 y160" , "Arial" , 90 , 50 )
  1162.     Gdip_DeleteBrush( Brush )
  1163.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1164.     Gdip_TextToGraphics( G , "*3*" , "s16 Center vCenter Bold c" Brush " x-7 y160" , "Arial" , 90 , 50 )
  1165.     Gdip_DeleteBrush( Brush )
  1166.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1167.     Gdip_TextToGraphics( G , "*3*" , "s16 Center vCenter Bold c" Brush " x-6 y159" , "Arial" , 90 , 50 )
  1168.     Gdip_DeleteBrush( Brush )
  1169.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1170.     Gdip_TextToGraphics( G , "*4*" , "s16 Center vCenter Bold c" Brush " x-7 y188" , "Arial" , 90 , 50 )
  1171.     Gdip_DeleteBrush( Brush )
  1172.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1173.     Gdip_TextToGraphics( G , "*4*" , "s16 Center vCenter Bold c" Brush " x-5 y188" , "Arial" , 90 , 50 )
  1174.     Gdip_DeleteBrush( Brush )
  1175.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1176.     Gdip_TextToGraphics( G , "*4*" , "s16 Center vCenter Bold c" Brush " x-5 y190" , "Arial" , 90 , 50 )
  1177.     Gdip_DeleteBrush( Brush )
  1178.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1179.     Gdip_TextToGraphics( G , "*4*" , "s16 Center vCenter Bold c" Brush " x-7 y190" , "Arial" , 90 , 50 )
  1180.     Gdip_DeleteBrush( Brush )
  1181.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1182.     Gdip_TextToGraphics( G , "*4*" , "s16 Center vCenter Bold c" Brush " x-6 y189" , "Arial" , 90 , 50 )
  1183.     Gdip_DeleteBrush( Brush )
  1184.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1185.     Gdip_TextToGraphics( G , "*5*" , "s16 Center vCenter Bold c" Brush " x-7 y218" , "Arial" , 90 , 50 )
  1186.     Gdip_DeleteBrush( Brush )
  1187.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1188.     Gdip_TextToGraphics( G , "*5*" , "s16 Center vCenter Bold c" Brush " x-5 y218" , "Arial" , 90 , 50 )
  1189.     Gdip_DeleteBrush( Brush )
  1190.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1191.     Gdip_TextToGraphics( G , "*5*" , "s16 Center vCenter Bold c" Brush " x-5 y220" , "Arial" , 90 , 50 )
  1192.     Gdip_DeleteBrush( Brush )
  1193.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1194.     Gdip_TextToGraphics( G , "*5*" , "s16 Center vCenter Bold c" Brush " x-7 y220" , "Arial" , 90 , 50 )
  1195.     Gdip_DeleteBrush( Brush )
  1196.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1197.     Gdip_TextToGraphics( G , "*5*" , "s16 Center vCenter Bold c" Brush " x-6 y219" , "Arial" , 90 , 50 )
  1198.     Gdip_DeleteBrush( Brush )
  1199.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1200.     Gdip_TextToGraphics( G , "*6*" , "s16 Center vCenter Bold c" Brush " x-7 y248" , "Arial" , 90 , 50 )
  1201.     Gdip_DeleteBrush( Brush )
  1202.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1203.     Gdip_TextToGraphics( G , "*6*" , "s16 Center vCenter Bold c" Brush " x-5 y248" , "Arial" , 90 , 50 )
  1204.     Gdip_DeleteBrush( Brush )
  1205.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1206.     Gdip_TextToGraphics( G , "*6*" , "s16 Center vCenter Bold c" Brush " x-5 y250" , "Arial" , 90 , 50 )
  1207.     Gdip_DeleteBrush( Brush )
  1208.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1209.     Gdip_TextToGraphics( G , "*6*" , "s16 Center vCenter Bold c" Brush " x-7 y250" , "Arial" , 90 , 50 )
  1210.     Gdip_DeleteBrush( Brush )
  1211.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1212.     Gdip_TextToGraphics( G , "*6*" , "s16 Center vCenter Bold c" Brush " x-6 y249" , "Arial" , 90 , 50 )
  1213.     Gdip_DeleteBrush( Brush )
  1214.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1215.     Gdip_TextToGraphics( G , "*7*" , "s16 Center vCenter Bold c" Brush " x-7 y278" , "Arial" , 90 , 50 )
  1216.     Gdip_DeleteBrush( Brush )
  1217.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1218.     Gdip_TextToGraphics( G , "*7*" , "s16 Center vCenter Bold c" Brush " x-5 y278" , "Arial" , 90 , 50 )
  1219.     Gdip_DeleteBrush( Brush )
  1220.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1221.     Gdip_TextToGraphics( G , "*7*" , "s16 Center vCenter Bold c" Brush " x-5 y280" , "Arial" , 90 , 50 )
  1222.     Gdip_DeleteBrush( Brush )
  1223.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1224.     Gdip_TextToGraphics( G , "*7*" , "s16 Center vCenter Bold c" Brush " x-7 y280" , "Arial" , 90 , 50 )
  1225.     Gdip_DeleteBrush( Brush )
  1226.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1227.     Gdip_TextToGraphics( G , "*7*" , "s16 Center vCenter Bold c" Brush " x-6 y279" , "Arial" , 90 , 50 )
  1228.     Gdip_DeleteBrush( Brush )
  1229.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1230.     Gdip_TextToGraphics( G , "*8*" , "s16 Center vCenter Bold c" Brush " x-7 y308" , "Arial" , 90 , 50 )
  1231.     Gdip_DeleteBrush( Brush )
  1232.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1233.     Gdip_TextToGraphics( G , "*8*" , "s16 Center vCenter Bold c" Brush " x-5 y308" , "Arial" , 90 , 50 )
  1234.     Gdip_DeleteBrush( Brush )
  1235.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1236.     Gdip_TextToGraphics( G , "*8*" , "s16 Center vCenter Bold c" Brush " x-5 y310" , "Arial" , 90 , 50 )
  1237.     Gdip_DeleteBrush( Brush )
  1238.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1239.     Gdip_TextToGraphics( G , "*8*" , "s16 Center vCenter Bold c" Brush " x-7 y310" , "Arial" , 90 , 50 )
  1240.     Gdip_DeleteBrush( Brush )
  1241.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1242.     Gdip_TextToGraphics( G , "*8*" , "s16 Center vCenter Bold c" Brush " x-6 y309" , "Arial" , 90 , 50 )
  1243.     Gdip_DeleteBrush( Brush )
  1244.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1245.     Gdip_TextToGraphics( G , "*9*" , "s16 Center vCenter Bold c" Brush " x-7 y338" , "Arial" , 90 , 50 )
  1246.     Gdip_DeleteBrush( Brush )
  1247.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1248.     Gdip_TextToGraphics( G , "*9*" , "s16 Center vCenter Bold c" Brush " x-5 y338" , "Arial" , 90 , 50 )
  1249.     Gdip_DeleteBrush( Brush )
  1250.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1251.     Gdip_TextToGraphics( G , "*9*" , "s16 Center vCenter Bold c" Brush " x-5 y340" , "Arial" , 90 , 50 )
  1252.     Gdip_DeleteBrush( Brush )
  1253.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1254.     Gdip_TextToGraphics( G , "*9*" , "s16 Center vCenter Bold c" Brush " x-7 y340" , "Arial" , 90 , 50 )
  1255.     Gdip_DeleteBrush( Brush )
  1256.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1257.     Gdip_TextToGraphics( G , "*9*" , "s16 Center vCenter Bold c" Brush " x-6 y339" , "Arial" , 90 , 50 )
  1258.     Gdip_DeleteBrush( Brush )
  1259.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1260.     Gdip_TextToGraphics( G , "*10" , "s16 Center vCenter Bold c" Brush " x-7 y368" , "Arial" , 90 , 50 )
  1261.     Gdip_DeleteBrush( Brush )
  1262.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1263.     Gdip_TextToGraphics( G , "*10" , "s16 Center vCenter Bold c" Brush " x-5 y368" , "Arial" , 90 , 50 )
  1264.     Gdip_DeleteBrush( Brush )
  1265.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1266.     Gdip_TextToGraphics( G , "*10" , "s16 Center vCenter Bold c" Brush " x-5 y370" , "Arial" , 90 , 50 )
  1267.     Gdip_DeleteBrush( Brush )
  1268.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1269.     Gdip_TextToGraphics( G , "*10" , "s16 Center vCenter Bold c" Brush " x-7 y370" , "Arial" , 90 , 50 )
  1270.     Gdip_DeleteBrush( Brush )
  1271.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1272.     Gdip_TextToGraphics( G , "*10" , "s16 Center vCenter Bold c" Brush " x-6 y369" , "Arial" , 90 , 50 )
  1273.     Gdip_DeleteBrush( Brush )
  1274.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1275.     Gdip_TextToGraphics( G , "Turn On/Off Search Loop ( 1: Loop , 0: Find Once )" , "s12  vCenter Bold c" Brush " x69 y97" , "Arial" , 300 , 50 )
  1276.     Gdip_DeleteBrush( Brush )
  1277.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1278.     Gdip_TextToGraphics( G , "Turn On/Off Search Loop ( 1: Loop , 0: Find Once )" , "s12  vCenter Bold c" Brush " x70 y98" , "Arial" , 300 , 50 )
  1279.     Gdip_DeleteBrush( Brush )
  1280.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1281.     Gdip_TextToGraphics( G , "Click or Move ( 0: Move , 1: Click )" , "s12  vCenter Bold c" Brush " x69 y127" , "Arial" , 300 , 50 )
  1282.     Gdip_DeleteBrush( Brush )
  1283.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1284.     Gdip_TextToGraphics( G , "Click or Move ( 0: Move , 1: Click )" , "s12  vCenter Bold c" Brush " x70 y128" , "Arial" , 300 , 50 )
  1285.     Gdip_DeleteBrush( Brush )
  1286.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1287.     Gdip_TextToGraphics( G , "Number of Clicks Per Loop (Range: 1+)(*See Below)" , "s12  vCenter Bold c" Brush " x69 y157" , "Arial" , 330 , 50 )
  1288.     Gdip_DeleteBrush( Brush )
  1289.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1290.     Gdip_TextToGraphics( G , "Number of Clicks Per Loop (Range: 1+)(*See Below)" , "s12  vCenter Bold c" Brush " x70 y158" , "Arial" , 330 , 50 )
  1291.     Gdip_DeleteBrush( Brush )
  1292.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1293.     Gdip_TextToGraphics( G , "X-Offset (Click & Move)" , "s12  vCenter Bold c" Brush " x69 y187" , "Arial" , 330 , 50 )
  1294.     Gdip_DeleteBrush( Brush )
  1295.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1296.     Gdip_TextToGraphics( G , "X-Offset (Click & Move)" , "s12  vCenter Bold c" Brush " x70 y188" , "Arial" , 330 , 50 )
  1297.     Gdip_DeleteBrush( Brush )
  1298.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1299.     Gdip_TextToGraphics( G , "Y-Offset (Click & Move)" , "s12  vCenter Bold c" Brush " x69 y217" , "Arial" , 330 , 50 )
  1300.     Gdip_DeleteBrush( Brush )
  1301.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1302.     Gdip_TextToGraphics( G , "Y-Offset (Click & Move)" , "s12  vCenter Bold c" Brush " x70 y218" , "Arial" , 330 , 50 )
  1303.     Gdip_DeleteBrush( Brush )
  1304.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1305.     Gdip_TextToGraphics( G , "Which Mouse Button to use  (Values: L , M , R )" , "s12  vCenter Bold c" Brush " x69 y247" , "Arial" , 330 , 50 )
  1306.     Gdip_DeleteBrush( Brush )
  1307.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1308.     Gdip_TextToGraphics( G , "Which Mouse Button to use  (Values: L , M , R )" , "s12  vCenter Bold c" Brush " x70 y248" , "Arial" , 330 , 50 )
  1309.     Gdip_DeleteBrush( Brush )
  1310.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1311.     Gdip_TextToGraphics( G , "Amount of time a click is held (in ms)" , "s12  vCenter Bold c" Brush " x69 y277" , "Arial" , 330 , 50 )
  1312.     Gdip_DeleteBrush( Brush )
  1313.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1314.     Gdip_TextToGraphics( G , "Amount of time a click is held (in ms)" , "s12  vCenter Bold c" Brush " x70 y278" , "Arial" , 330 , 50 )
  1315.     Gdip_DeleteBrush( Brush )
  1316.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1317.     Gdip_TextToGraphics( G , "Amount of time between key strokes (in ms)" , "s12  vCenter Bold c" Brush " x69 y307" , "Arial" , 330 , 50 )
  1318.     Gdip_DeleteBrush( Brush )
  1319.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1320.     Gdip_TextToGraphics( G , "Amount of time between key strokes (in ms)" , "s12  vCenter Bold c" Brush " x70 y308" , "Arial" , 330 , 50 )
  1321.     Gdip_DeleteBrush( Brush )
  1322.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1323.     Gdip_TextToGraphics( G , "Loop Delay (Delay between Search Loops (in ms))" , "s12  vCenter Bold c" Brush " x69 y337" , "Arial" , 330 , 50 )
  1324.     Gdip_DeleteBrush( Brush )
  1325.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1326.     Gdip_TextToGraphics( G , "Loop Delay (Delay between Search Loops (in ms))" , "s12  vCenter Bold c" Brush " x70 y338" , "Arial" , 330 , 50 )
  1327.     Gdip_DeleteBrush( Brush )
  1328.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1329.     Gdip_TextToGraphics( G , "Commands to ""send"" (e.g. {Enter} r) See Documentation For List of values" , "s12  vCenter Bold c" Brush " x69 y370" , "Arial" , 240 , 50 )
  1330.     Gdip_DeleteBrush( Brush )
  1331.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1332.     Gdip_TextToGraphics( G , "Commands to ""send"" (e.g. {Enter} r) See Documentation For List of values" , "s12  vCenter Bold c" Brush " x70 y371" , "Arial" , 240 , 50 )
  1333.     Gdip_DeleteBrush( Brush )
  1334.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1335.     Gdip_TextToGraphics( G , "Set *2*3* both to a value of 0 to disable Click and Move" , "s12  vCenter Bold c" Brush " x31 y400" , "Arial" , 400 , 50 )
  1336.     Gdip_DeleteBrush( Brush )
  1337.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1338.     Gdip_TextToGraphics( G , "Set *2*3* both to a value of 0 to disable Click and Move" , "s12  vCenter Bold c" Brush " x33 y400" , "Arial" , 400 , 50 )
  1339.     Gdip_DeleteBrush( Brush )
  1340.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1341.     Gdip_TextToGraphics( G , "Set *2*3* both to a value of 0 to disable Click and Move" , "s12  vCenter Bold c" Brush " x33 y402" , "Arial" , 400 , 50 )
  1342.     Gdip_DeleteBrush( Brush )
  1343.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1344.     Gdip_TextToGraphics( G , "Set *2*3* both to a value of 0 to disable Click and Move" , "s12  vCenter Bold c" Brush " x31 y402" , "Arial" , 400 , 50 )
  1345.     Gdip_DeleteBrush( Brush )
  1346.     Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
  1347.     Gdip_TextToGraphics( G , "Set *2*3* both to a value of 0 to disable Click and Move" , "s12  vCenter Bold c" Brush " x32 y401" , "Arial" , 400 , 50 )
  1348.     Gdip_DeleteBrush( Brush )
  1349.     Gdip_DeleteGraphics( G )
  1350.     return pBitmap
  1351. }
  1352. HotkeyWindow(){
  1353.     ;Bitmap Created Using: HB Bitmap Maker
  1354.     pBitmap:=Gdip_CreateBitmap( 300 , 250 )
  1355.      G := Gdip_GraphicsFromImage( pBitmap )
  1356.     Gdip_SetSmoothingMode( G , 4 )
  1357.     Brush := Gdip_CreateLineBrush( 19 , 15 , 52 , 59 , "0xFF22005D" , "0xFF111111" , 1 )
  1358.     Gdip_FillRectangle( G , Brush , -1 , -1 , 303 , 253 )
  1359.     Gdip_DeleteBrush( Brush )
  1360.     Brush := Gdip_BrushCreateSolid( "0xFF252525" )
  1361.     Gdip_FillRectangle( G , Brush , 10 , 40 , 279 , 200 )
  1362.     Gdip_DeleteBrush( Brush )
  1363.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1364.     Gdip_DrawRectangle( G , Pen , 0 , 0 , 299 , 249 )
  1365.     Gdip_DeletePen( Pen )
  1366.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1367.     Gdip_DrawRectangle( G , Pen , 10 , 40 , 279 , 200 )
  1368.     Gdip_DeletePen( Pen )
  1369.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1370.     Gdip_DrawLine( G , Pen , 299 , 0 , 299 , 249 )
  1371.     Gdip_DeletePen( Pen )
  1372.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1373.     Gdip_DrawLine( G , Pen , 0 , 249 , 299 , 249 )
  1374.     Gdip_DeletePen( Pen )
  1375.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1376.     Gdip_DrawLine( G , Pen , 289 , 40 , 289 , 239 )
  1377.     Gdip_DeletePen( Pen )
  1378.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1379.     Gdip_DrawLine( G , Pen , 11 , 240 , 289 , 240 )
  1380.     Gdip_DeletePen( Pen )
  1381.     Pen := Gdip_CreatePen( "0xFF777777" , 2 )
  1382.     Gdip_DrawRectangle( G , Pen , 50 , 6 , 199 , 25 )
  1383.     Gdip_DeletePen( Pen )
  1384.     Pen := Gdip_CreatePen( "0xFF000000" , 2 )
  1385.     Gdip_DrawRectangle( G , Pen , 51 , 7 , 199 , 25 )
  1386.     Gdip_DeletePen( Pen )
  1387.     Brush := Gdip_CreateLineBrush( 74 , 15 , 86 , 39 , "0xFF7100AD" , "0xFF000000" , 1 )
  1388.     Gdip_FillRectangle( G , Brush , 50 , 6 , 200 , 26 )
  1389.     Gdip_DeleteBrush( Brush )
  1390.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1391.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x49 y-5" , "Arial" , 200 , 50 )
  1392.     Gdip_DeleteBrush( Brush )
  1393.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1394.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x50 y-5" , "Arial" , 200 , 50 )
  1395.     Gdip_DeleteBrush( Brush )
  1396.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1397.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x51 y-5" , "Arial" , 200 , 50 )
  1398.     Gdip_DeleteBrush( Brush )
  1399.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1400.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x51 y-4" , "Arial" , 200 , 50 )
  1401.     Gdip_DeleteBrush( Brush )
  1402.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1403.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x50 y-4" , "Arial" , 200 , 50 )
  1404.     Gdip_DeleteBrush( Brush )
  1405.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1406.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x49 y-4" , "Arial" , 200 , 50 )
  1407.     Gdip_DeleteBrush( Brush )
  1408.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1409.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x49 y-3" , "Arial" , 200 , 50 )
  1410.     Gdip_DeleteBrush( Brush )
  1411.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1412.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x50 y-3" , "Arial" , 200 , 50 )
  1413.     Gdip_DeleteBrush( Brush )
  1414.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1415.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x51 y-3" , "Arial" , 200 , 50 )
  1416.     Gdip_DeleteBrush( Brush )
  1417.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1418.     Gdip_TextToGraphics( G , "Hotkeys & Info" , "s16 Center vCenter Bold c" Brush " x50 y-4" , "Arial" , 200 , 50 )
  1419.     Gdip_DeleteBrush( Brush )
  1420.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  1421.     Gdip_FillRectangle( G , Brush , 15 , 45 , 270 , 70 )
  1422.     Gdip_DeleteBrush( Brush )
  1423.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1424.     Gdip_TextToGraphics( G , "Info" , "s12 Center vCenter Bold c" Brush " x49 y32" , "Arial" , 200 , 50 )
  1425.     Gdip_DeleteBrush( Brush )
  1426.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1427.     Gdip_TextToGraphics( G , "Info" , "s12 Center vCenter Bold c" Brush " x51 y32" , "Arial" , 200 , 50 )
  1428.     Gdip_DeleteBrush( Brush )
  1429.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1430.     Gdip_TextToGraphics( G , "Info" , "s12 Center vCenter Bold c" Brush " x51 y34" , "Arial" , 200 , 50 )
  1431.     Gdip_DeleteBrush( Brush )
  1432.     Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1433.     Gdip_TextToGraphics( G , "Info" , "s12 Center vCenter Bold c" Brush " x49 y34" , "Arial" , 200 , 50 )
  1434.     Gdip_DeleteBrush( Brush )
  1435.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1436.     Gdip_TextToGraphics( G , "Info" , "s12 Center vCenter Bold c" Brush " x50 y33" , "Arial" , 200 , 50 )
  1437.     Gdip_DeleteBrush( Brush )
  1438.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1439.     Gdip_TextToGraphics( G , "Written By:           Hellbent aka CivReborn" , "s10  vCenter Bold c" Brush " x48 y48" , "Arial" , 250 , 50 )
  1440.     Gdip_DeleteBrush( Brush )
  1441.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  1442.     Gdip_TextToGraphics( G , "Written By:           Hellbent aka CivReborn" , "s10  vCenter Bold c" Brush " x50 y50" , "Arial" , 250 , 50 )
  1443.     Gdip_DeleteBrush( Brush )
  1444.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1445.     Gdip_TextToGraphics( G , "Date:                     June 3rd, 2019" , "s10  vCenter Bold c" Brush " x48 y63" , "Arial" , 250 , 50 )
  1446.     Gdip_DeleteBrush( Brush )
  1447.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  1448.     Gdip_TextToGraphics( G , "Date:                     June 3rd, 2019" , "s10  vCenter Bold c" Brush " x50 y65" , "Arial" , 250 , 50 )
  1449.     Gdip_DeleteBrush( Brush )
  1450.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1451.     Gdip_TextToGraphics( G , "All Rights Reserved" , "s10  vCenter Bold c" Brush " x108 y80" , "Arial" , 250 , 50 )
  1452.     Gdip_DeleteBrush( Brush )
  1453.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  1454.     Gdip_TextToGraphics( G , "All Rights Reserved" , "s10  vCenter Bold c" Brush " x110 y82" , "Arial" , 250 , 50 )
  1455.     Gdip_DeleteBrush( Brush )
  1456.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1457.     Gdip_DrawRectangle( G , Pen , 15 , 45 , 270 , 70 )
  1458.     Gdip_DeletePen( Pen )
  1459.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1460.     Gdip_DrawLine( G , Pen , 15 , 45 , 15 , 114 )
  1461.     Gdip_DeletePen( Pen )
  1462.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1463.     Gdip_DrawLine( G , Pen , 15 , 45 , 284 , 45 )
  1464.     Gdip_DeletePen( Pen )
  1465.     Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  1466.     Gdip_FillRectangle( G , Brush , 15 , 120 , 270 , 70 )
  1467.     Gdip_DeleteBrush( Brush )
  1468.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1469.     Gdip_TextToGraphics( G , "Start:" , "s12  vCenter Bold c" Brush " x19 y111" , "Arial" , 250 , 50 )
  1470.     Gdip_DeleteBrush( Brush )
  1471.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1472.     Gdip_TextToGraphics( G , "Start:" , "s12  vCenter Bold c" Brush " x21 y111" , "Arial" , 250 , 50 )
  1473.     Gdip_DeleteBrush( Brush )
  1474.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1475.     Gdip_TextToGraphics( G , "Start:" , "s12  vCenter Bold c" Brush " x21 y113" , "Arial" , 250 , 50 )
  1476.     Gdip_DeleteBrush( Brush )
  1477.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1478.     Gdip_TextToGraphics( G , "Start:" , "s12  vCenter Bold c" Brush " x19 y113" , "Arial" , 250 , 50 )
  1479.     Gdip_DeleteBrush( Brush )
  1480.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1481.     Gdip_TextToGraphics( G , "Start:" , "s12  vCenter Bold c" Brush " x20 y112" , "Arial" , 250 , 50 )
  1482.     Gdip_DeleteBrush( Brush )
  1483.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1484.     Gdip_TextToGraphics( G , "Stop:" , "s12  vCenter Bold c" Brush " x19 y146" , "Arial" , 250 , 50 )
  1485.     Gdip_DeleteBrush( Brush )
  1486.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1487.     Gdip_TextToGraphics( G , "Stop:" , "s12  vCenter Bold c" Brush " x21 y146" , "Arial" , 250 , 50 )
  1488.     Gdip_DeleteBrush( Brush )
  1489.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1490.     Gdip_TextToGraphics( G , "Stop:" , "s12  vCenter Bold c" Brush " x21 y148" , "Arial" , 250 , 50 )
  1491.     Gdip_DeleteBrush( Brush )
  1492.     Brush := Gdip_BrushCreateSolid( "0xFF7000AC" )
  1493.     Gdip_TextToGraphics( G , "Stop:" , "s12  vCenter Bold c" Brush " x19 y148" , "Arial" , 250 , 50 )
  1494.     Gdip_DeleteBrush( Brush )
  1495.     Brush := Gdip_BrushCreateSolid( "0xFF999999" )
  1496.     Gdip_TextToGraphics( G , "Stop:" , "s12  vCenter Bold c" Brush " x20 y147" , "Arial" , 250 , 50 )
  1497.     Gdip_DeleteBrush( Brush )
  1498.     Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  1499.     Gdip_DrawRectangle( G , Pen , 15 , 120 , 270 , 70 )
  1500.     Gdip_DeletePen( Pen )
  1501.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1502.     Gdip_DrawLine( G , Pen , 15 , 120 , 15 , 189 )
  1503.     Gdip_DeletePen( Pen )
  1504.     Pen := Gdip_CreatePen( "0xFF777777" , 1 )
  1505.     Gdip_DrawLine( G , Pen , 15 , 120 , 284 , 120 )
  1506.     Gdip_DeletePen( Pen )
  1507.     Gdip_DeleteGraphics( G )
  1508.     return pBitmap
  1509. }
  1510. New_Brush(colour:="000000",Alpha:="FF"){
  1511.     new_colour := "0x" Alpha colour
  1512.     DllCall("gdiplus\GdipCreateSolidFill", "UInt", new_colour, A_PtrSize ? "UPtr*" : "UInt*", pBrush)
  1513.     return pBrush
  1514. }
  1515. Gdip_GraphicsClear(pGraphics, ARGB=0x00ffffff){
  1516.     return DllCall("gdiplus\GdipGraphicsClear", A_PtrSize ? "UPtr" : "UInt", pGraphics, "int", ARGB)
  1517. }
  1518. Fill_Box(pGraphics,pBrush,x,y,w,h)  {
  1519.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1520.     return DllCall("gdiplus\GdipFillRectangle", Ptr, pGraphics, Ptr, pBrush, "float", x, "float", y, "float", w, "float", h)
  1521. }
  1522. UpdateLayeredWindow(hwnd, hdc, x="", y="", w="", h="", Alpha=255){
  1523.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1524.     if ((x != "") && (y != ""))
  1525.         VarSetCapacity(pt, 8), NumPut(x, pt, 0, "UInt"), NumPut(y, pt, 4, "UInt")
  1526.     if (w = "") ||(h = "")
  1527.         WinGetPos,,, w, h, ahk_id %hwnd%
  1528.     return DllCall("UpdateLayeredWindow", Ptr, hwnd, Ptr, 0, Ptr, ((x = "") && (y = "")) ? 0 : &pt, "int64*", w|h<<32, Ptr, hdc, "int64*", 0, "uint", 0, "UInt*", Alpha<<16|1<<24, "uint", 2)
  1529. }
  1530. BitBlt(ddc, dx, dy, dw, dh, sdc, sx, sy, Raster=""){
  1531.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1532.     return DllCall("gdi32\BitBlt", Ptr, dDC, "int", dx, "int", dy, "int", dw, "int", dh, Ptr, sDC, "int", sx, "int", sy, "uint", Raster ? Raster : 0x00CC0020)
  1533. }
  1534. Gdip_DrawImage(pGraphics, pBitmap, dx="", dy="", dw="", dh="", sx="", sy="", sw="", sh="", Matrix=1){
  1535.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1536.     if (Matrix&1 = "")
  1537.         ImageAttr := Gdip_SetImageAttributesColorMatrix(Matrix)
  1538.     else if (Matrix != 1)
  1539.         ImageAttr := Gdip_SetImageAttributesColorMatrix("1|0|0|0|0|0|1|0|0|0|0|0|1|0|0|0|0|0|" Matrix "|0|0|0|0|0|1")
  1540.     if(sx = "" && sy = "" && sw = "" && sh = ""){
  1541.         if(dx = "" && dy = "" && dw = "" && dh = ""){
  1542.             sx := dx := 0, sy := dy := 0
  1543.             sw := dw := Gdip_GetImageWidth(pBitmap)
  1544.             sh := dh := Gdip_GetImageHeight(pBitmap)
  1545.         }else   {
  1546.             sx := sy := 0,sw := Gdip_GetImageWidth(pBitmap),sh := Gdip_GetImageHeight(pBitmap)
  1547.         }
  1548.     }
  1549.     E := DllCall("gdiplus\GdipDrawImageRectRect", Ptr, pGraphics, Ptr, pBitmap, "float", dx, "float", dy, "float", dw, "float", dh, "float", sx, "float", sy, "float", sw, "float", sh, "int", 2, Ptr, ImageAttr, Ptr, 0, Ptr, 0)
  1550.     if ImageAttr
  1551.         Gdip_DisposeImageAttributes(ImageAttr)
  1552.     return E
  1553. }
  1554. Gdip_SetImageAttributesColorMatrix(Matrix){
  1555.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1556.     VarSetCapacity(ColourMatrix, 100, 0)
  1557.     Matrix := RegExReplace(RegExReplace(Matrix, "^[^\d-\.]+([\d\.])", "$1", "", 1), "[^\d-\.]+", "|")
  1558.     StringSplit, Matrix, Matrix, |
  1559.     Loop, 25
  1560.     {
  1561.         Matrix := (Matrix%A_Index% != "") ? Matrix%A_Index% : Mod(A_Index-1, 6) ? 0 : 1
  1562.         NumPut(Matrix, ColourMatrix, (A_Index-1)*4, "float")
  1563.     }
  1564.     DllCall("gdiplus\GdipCreateImageAttributes", A_PtrSize ? "UPtr*" : "uint*", ImageAttr)
  1565.     DllCall("gdiplus\GdipSetImageAttributesColorMatrix", Ptr, ImageAttr, "int", 1, "int", 1, Ptr, &ColourMatrix, Ptr, 0, "int", 0)
  1566.     return ImageAttr
  1567. }
  1568. Gdip_GetImageWidth(pBitmap){
  1569.    DllCall("gdiplus\GdipGetImageWidth", A_PtrSize ? "UPtr" : "UInt", pBitmap, "uint*", Width)
  1570.    return Width
  1571. }
  1572. Gdip_GetImageHeight(pBitmap){
  1573.    DllCall("gdiplus\GdipGetImageHeight", A_PtrSize ? "UPtr" : "UInt", pBitmap, "uint*", Height)
  1574.    return Height
  1575. }
  1576. Gdip_DeletePen(pPen){
  1577.    return DllCall("gdiplus\GdipDeletePen", A_PtrSize ? "UPtr" : "UInt", pPen)
  1578. }
  1579. Gdip_DeleteBrush(pBrush){
  1580.    return DllCall("gdiplus\GdipDeleteBrush", A_PtrSize ? "UPtr" : "UInt", pBrush)
  1581. }
  1582. Gdip_DisposeImage(pBitmap){
  1583.    return DllCall("gdiplus\GdipDisposeImage", A_PtrSize ? "UPtr" : "UInt", pBitmap)
  1584. }
  1585. Gdip_DeleteGraphics(pGraphics){
  1586.    return DllCall("gdiplus\GdipDeleteGraphics", A_PtrSize ? "UPtr" : "UInt", pGraphics)
  1587. }
  1588. Gdip_DisposeImageAttributes(ImageAttr){
  1589.     return DllCall("gdiplus\GdipDisposeImageAttributes", A_PtrSize ? "UPtr" : "UInt", ImageAttr)
  1590. }
  1591. Gdip_DeleteFont(hFont){
  1592.    return DllCall("gdiplus\GdipDeleteFont", A_PtrSize ? "UPtr" : "UInt", hFont)
  1593. }
  1594. Gdip_DeleteStringFormat(hFormat){
  1595.    return DllCall("gdiplus\GdipDeleteStringFormat", A_PtrSize ? "UPtr" : "UInt", hFormat)
  1596. }
  1597. Gdip_DeleteFontFamily(hFamily){
  1598.    return DllCall("gdiplus\GdipDeleteFontFamily", A_PtrSize ? "UPtr" : "UInt", hFamily)
  1599. }
  1600. CreateCompatibleDC(hdc=0){
  1601.    return DllCall("CreateCompatibleDC", A_PtrSize ? "UPtr" : "UInt", hdc)
  1602. }
  1603. SelectObject(hdc, hgdiobj){
  1604.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1605.     return DllCall("SelectObject", Ptr, hdc, Ptr, hgdiobj)
  1606. }
  1607. DeleteObject(hObject){
  1608.    return DllCall("DeleteObject", A_PtrSize ? "UPtr" : "UInt", hObject)
  1609. }
  1610. GetDC(hwnd=0){
  1611.     return DllCall("GetDC", A_PtrSize ? "UPtr" : "UInt", hwnd)
  1612. }
  1613. GetDCEx(hwnd, flags=0, hrgnClip=0){
  1614.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1615.     return DllCall("GetDCEx", Ptr, hwnd, Ptr, hrgnClip, "int", flags)
  1616. }
  1617. ReleaseDC(hdc, hwnd=0){
  1618.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1619.     return DllCall("ReleaseDC", Ptr, hwnd, Ptr, hdc)
  1620. }
  1621. DeleteDC(hdc){
  1622.    return DllCall("DeleteDC", A_PtrSize ? "UPtr" : "UInt", hdc)
  1623. }
  1624. Gdip_SetClipRegion(pGraphics, Region, CombineMode=0){
  1625.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1626.     return DllCall("gdiplus\GdipSetClipRegion", Ptr, pGraphics, Ptr, Region, "int", CombineMode)
  1627. }
  1628. CreateDIBSection(w, h, hdc="", bpp=32, ByRef ppvBits=0){
  1629.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1630.     hdc2 := hdc ? hdc : GetDC()
  1631.     VarSetCapacity(bi, 40, 0)
  1632.     NumPut(w, bi, 4, "uint"), NumPut(h, bi, 8, "uint"), NumPut(40, bi, 0, "uint"), NumPut(1, bi, 12, "ushort"), NumPut(0, bi, 16, "uInt"), NumPut(bpp, bi, 14, "ushort")
  1633.     hbm := DllCall("CreateDIBSection", Ptr, hdc2, Ptr, &bi, "uint", 0, A_PtrSize ? "UPtr*" : "uint*", ppvBits, Ptr, 0, "uint", 0, Ptr)
  1634.     if !hdc
  1635.         ReleaseDC(hdc2)
  1636.     return hbm
  1637. }
  1638. Gdip_GraphicsFromImage(pBitmap){
  1639.     DllCall("gdiplus\GdipGetImageGraphicsContext", A_PtrSize ? "UPtr" : "UInt", pBitmap, A_PtrSize ? "UPtr*" : "UInt*", pGraphics)
  1640.     return pGraphics
  1641. }
  1642. Gdip_GraphicsFromHDC(hdc){
  1643.     DllCall("gdiplus\GdipCreateFromHDC", A_PtrSize ? "UPtr" : "UInt", hdc, A_PtrSize ? "UPtr*" : "UInt*", pGraphics)
  1644.     return pGraphics
  1645. }
  1646. Gdip_GetDC(pGraphics){
  1647.     DllCall("gdiplus\GdipGetDC", A_PtrSize ? "UPtr" : "UInt", pGraphics, A_PtrSize ? "UPtr*" : "UInt*", hdc)
  1648.     return hdc
  1649. }
  1650. Gdip_Startup(){
  1651.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1652.     if !DllCall("GetModuleHandle", "str", "gdiplus", Ptr)
  1653.         DllCall("LoadLibrary", "str", "gdiplus")
  1654.     VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), si := Chr(1)
  1655.     DllCall("gdiplus\GdiplusStartup", A_PtrSize ? "UPtr*" : "uint*", pToken, Ptr, &si, Ptr, 0)
  1656.     return pToken
  1657. }
  1658. Gdip_TextToGraphics(pGraphics, Text, Options, Font="Arial", Width="", Height="", Measure=0){
  1659.     IWidth := Width, IHeight:= Height
  1660.     RegExMatch(Options, "i)X([\-\d\.]+)(p*)", xpos)
  1661.     RegExMatch(Options, "i)Y([\-\d\.]+)(p*)", ypos)
  1662.     RegExMatch(Options, "i)W([\-\d\.]+)(p*)", Width)
  1663.     RegExMatch(Options, "i)H([\-\d\.]+)(p*)", Height)
  1664.     RegExMatch(Options, "i)C(?!(entre|enter))([a-f\d]+)", Colour)
  1665.     RegExMatch(Options, "i)Top|Up|Bottom|Down|vCentre|vCenter", vPos)
  1666.     RegExMatch(Options, "i)NoWrap", NoWrap)
  1667.     RegExMatch(Options, "i)R(\d)", Rendering)
  1668.     RegExMatch(Options, "i)S(\d+)(p*)", Size)
  1669.     if !Gdip_DeleteBrush(Gdip_CloneBrush(Colour2))
  1670.         PassBrush := 1, pBrush := Colour2
  1671.     if !(IWidth && IHeight) && (xpos2 || ypos2 || Width2 || Height2 || Size2)
  1672.         return -1
  1673.     Style := 0, Styles := "Regular|Bold|Italic|BoldItalic|Underline|Strikeout"
  1674.     Loop, Parse, Styles, |
  1675.     {
  1676.         if RegExMatch(Options, "\b" A_loopField)
  1677.         Style |= (A_LoopField != "StrikeOut") ? (A_Index-1) : 8
  1678.     }
  1679.     Align := 0, Alignments := "Near|Left|Centre|Center|Far|Right"
  1680.     Loop, Parse, Alignments, |
  1681.     {
  1682.         if RegExMatch(Options, "\b" A_loopField)
  1683.             Align |= A_Index//2.1      ; 0|0|1|1|2|2
  1684.     }
  1685.     xpos := (xpos1 != "") ? xpos2 ? IWidth*(xpos1/100) : xpos1 : 0
  1686.     ypos := (ypos1 != "") ? ypos2 ? IHeight*(ypos1/100) : ypos1 : 0
  1687.     Width := Width1 ? Width2 ? IWidth*(Width1/100) : Width1 : IWidth
  1688.     Height := Height1 ? Height2 ? IHeight*(Height1/100) : Height1 : IHeight
  1689.     if !PassBrush
  1690.         Colour := "0x" (Colour2 ? Colour2 : "ff000000")
  1691.     Rendering := ((Rendering1 >= 0) && (Rendering1 <= 5)) ? Rendering1 : 4
  1692.     Size := (Size1 > 0) ? Size2 ? IHeight*(Size1/100) : Size1 : 12
  1693.     hFamily := Gdip_FontFamilyCreate(Font)
  1694.     hFont := Gdip_FontCreate(hFamily, Size, Style)
  1695.     FormatStyle := NoWrap ? 0x4000 | 0x1000 : 0x4000
  1696.     hFormat := Gdip_StringFormatCreate(FormatStyle)
  1697.     pBrush := PassBrush ? pBrush : Gdip_BrushCreateSolid(Colour)
  1698.     if !(hFamily && hFont && hFormat && pBrush && pGraphics)
  1699.         return !pGraphics ? -2 : !hFamily ? -3 : !hFont ? -4 : !hFormat ? -5 : !pBrush ? -6 : 0
  1700.     CreateRectF(RC, xpos, ypos, Width, Height)
  1701.     Gdip_SetStringFormatAlign(hFormat, Align)
  1702.     Gdip_SetTextRenderingHint(pGraphics, Rendering)
  1703.     ReturnRC := Gdip_MeasureString(pGraphics, Text, hFont, hFormat, RC)
  1704.     if vPos
  1705.     {
  1706.         StringSplit, ReturnRC, ReturnRC, |
  1707.         if (vPos = "vCentre") || (vPos = "vCenter")
  1708.             ypos += (Height-ReturnRC4)//2
  1709.         else if (vPos = "Top") || (vPos = "Up")
  1710.             ypos := 0
  1711.         else if (vPos = "Bottom") || (vPos = "Down")
  1712.             ypos := Height-ReturnRC4
  1713.         CreateRectF(RC, xpos, ypos, Width, ReturnRC4)
  1714.         ReturnRC := Gdip_MeasureString(pGraphics, Text, hFont, hFormat, RC)
  1715.     }
  1716.     if !Measure
  1717.         E := Gdip_DrawString(pGraphics, Text, hFont, hFormat, pBrush, RC)
  1718.     if !PassBrush
  1719.         Gdip_DeleteBrush(pBrush)
  1720.     Gdip_DeleteStringFormat(hFormat)
  1721.     Gdip_DeleteFont(hFont)
  1722.     Gdip_DeleteFontFamily(hFamily)
  1723.     return E ? E : ReturnRC
  1724. }
  1725. Gdip_DrawString(pGraphics, sString, hFont, hFormat, pBrush, ByRef RectF){
  1726.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1727.     if (!A_IsUnicode)
  1728.     {
  1729.         nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, 0, "int", 0)
  1730.         VarSetCapacity(wString, nSize*2)
  1731.         DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, &wString, "int", nSize)
  1732.     }
  1733.     return DllCall("gdiplus\GdipDrawString", Ptr, pGraphics, Ptr, A_IsUnicode ? &sString : &wString, "int", -1, Ptr, hFont, Ptr, &RectF, Ptr, hFormat, Ptr, pBrush)
  1734. }
  1735. Gdip_CreateLineBrush(x1, y1, x2, y2, ARGB1, ARGB2, WrapMode=1){
  1736.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1737.     CreatePointF(PointF1, x1, y1), CreatePointF(PointF2, x2, y2)
  1738.     DllCall("gdiplus\GdipCreateLineBrush", Ptr, &PointF1, Ptr, &PointF2, "Uint", ARGB1, "Uint", ARGB2, "int", WrapMode, A_PtrSize ? "UPtr*" : "UInt*", LGpBrush)
  1739.     return LGpBrush
  1740. }
  1741. Gdip_CreateLineBrushFromRect(x, y, w, h, ARGB1, ARGB2, LinearGradientMode=1, WrapMode=1){
  1742.     CreateRectF(RectF, x, y, w, h)
  1743.     DllCall("gdiplus\GdipCreateLineBrushFromRect", A_PtrSize ? "UPtr" : "UInt", &RectF, "int", ARGB1, "int", ARGB2, "int", LinearGradientMode, "int", WrapMode, A_PtrSize ? "UPtr*" : "UInt*", LGpBrush)
  1744.     return LGpBrush
  1745. }
  1746. Gdip_CloneBrush(pBrush){
  1747.     DllCall("gdiplus\GdipCloneBrush", A_PtrSize ? "UPtr" : "UInt", pBrush, A_PtrSize ? "UPtr*" : "UInt*", pBrushClone)
  1748.     return pBrushClone
  1749. }
  1750. Gdip_FontFamilyCreate(Font){
  1751.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1752.     if (!A_IsUnicode)
  1753.     {
  1754.         nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &Font, "int", -1, "uint", 0, "int", 0)
  1755.         VarSetCapacity(wFont, nSize*2)
  1756.         DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &Font, "int", -1, Ptr, &wFont, "int", nSize)
  1757.     }
  1758.     DllCall("gdiplus\GdipCreateFontFamilyFromName", Ptr, A_IsUnicode ? &Font : &wFont, "uint", 0, A_PtrSize ? "UPtr*" : "UInt*", hFamily)
  1759.     return hFamily
  1760. }
  1761. Gdip_SetStringFormatAlign(hFormat, Align){
  1762.    return DllCall("gdiplus\GdipSetStringFormatAlign", A_PtrSize ? "UPtr" : "UInt", hFormat, "int", Align)
  1763. }
  1764. Gdip_StringFormatCreate(Format=0, Lang=0){
  1765.    DllCall("gdiplus\GdipCreateStringFormat", "int", Format, "int", Lang, A_PtrSize ? "UPtr*" : "UInt*", hFormat)
  1766.    return hFormat
  1767. }
  1768. Gdip_FontCreate(hFamily, Size, Style=0){
  1769.    DllCall("gdiplus\GdipCreateFont", A_PtrSize ? "UPtr" : "UInt", hFamily, "float", Size, "int", Style, "int", 0, A_PtrSize ? "UPtr*" : "UInt*", hFont)
  1770.    return hFont
  1771. }
  1772. Gdip_CreatePen(ARGB, w){
  1773.    DllCall("gdiplus\GdipCreatePen1", "UInt", ARGB, "float", w, "int", 2, A_PtrSize ? "UPtr*" : "UInt*", pPen)
  1774.    return pPen
  1775. }
  1776. Gdip_CreatePenFromBrush(pBrush, w){
  1777.     DllCall("gdiplus\GdipCreatePen2", A_PtrSize ? "UPtr" : "UInt", pBrush, "float", w, "int", 2, A_PtrSize ? "UPtr*" : "UInt*", pPen)
  1778.     return pPen
  1779. }
  1780. Gdip_BrushCreateSolid(ARGB=0xff000000){
  1781.     DllCall("gdiplus\GdipCreateSolidFill", "UInt", ARGB, A_PtrSize ? "UPtr*" : "UInt*", pBrush)
  1782.     return pBrush
  1783. }
  1784. Gdip_BrushCreateHatch(ARGBfront, ARGBback, HatchStyle=0){
  1785.     DllCall("gdiplus\GdipCreateHatchBrush", "int", HatchStyle, "UInt", ARGBfront, "UInt", ARGBback, A_PtrSize ? "UPtr*" : "UInt*", pBrush)
  1786.     return pBrush
  1787. }
  1788. CreateRectF(ByRef RectF, x, y, w, h){
  1789.    VarSetCapacity(RectF, 16)
  1790.    NumPut(x, RectF, 0, "float"), NumPut(y, RectF, 4, "float"), NumPut(w, RectF, 8, "float"), NumPut(h, RectF, 12, "float")
  1791. }
  1792. Gdip_SetTextRenderingHint(pGraphics, RenderingHint){
  1793.     return DllCall("gdiplus\GdipSetTextRenderingHint", A_PtrSize ? "UPtr" : "UInt", pGraphics, "int", RenderingHint)
  1794. }
  1795. Gdip_MeasureString(pGraphics, sString, hFont, hFormat, ByRef RectF){
  1796.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1797.     VarSetCapacity(RC, 16)
  1798.     if !A_IsUnicode
  1799.     {
  1800.         nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, "uint", 0, "int", 0)
  1801.         VarSetCapacity(wString, nSize*2)
  1802.         DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, &wString, "int", nSize)
  1803.     }
  1804.     DllCall("gdiplus\GdipMeasureString", Ptr, pGraphics, Ptr, A_IsUnicode ? &sString : &wString, "int", -1, Ptr, hFont, Ptr, &RectF, Ptr, hFormat, Ptr, &RC, "uint*", Chars, "uint*", Lines)
  1805.     return &RC ? NumGet(RC, 0, "float") "|" NumGet(RC, 4, "float") "|" NumGet(RC, 8, "float") "|" NumGet(RC, 12, "float") "|" Chars "|" Lines : 0
  1806. }
  1807. CreateRect(ByRef Rect, x, y, w, h){
  1808.     VarSetCapacity(Rect, 16)
  1809.     NumPut(x, Rect, 0, "uint"), NumPut(y, Rect, 4, "uint"), NumPut(w, Rect, 8, "uint"), NumPut(h, Rect, 12, "uint")
  1810. }
  1811. CreateSizeF(ByRef SizeF, w, h){
  1812.    VarSetCapacity(SizeF, 8)
  1813.    NumPut(w, SizeF, 0, "float"), NumPut(h, SizeF, 4, "float")
  1814. }
  1815. CreatePointF(ByRef PointF, x, y){
  1816.    VarSetCapacity(PointF, 8)
  1817.    NumPut(x, PointF, 0, "float"), NumPut(y, PointF, 4, "float")
  1818. }
  1819. Gdip_DrawArc(pGraphics, pPen, x, y, w, h, StartAngle, SweepAngle){
  1820.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1821.     return DllCall("gdiplus\GdipDrawArc", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h, "float", StartAngle, "float", SweepAngle)
  1822. }
  1823. Gdip_DrawPie(pGraphics, pPen, x, y, w, h, StartAngle, SweepAngle){
  1824.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1825.     return DllCall("gdiplus\GdipDrawPie", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h, "float", StartAngle, "float", SweepAngle)
  1826. }
  1827. Gdip_DrawLine(pGraphics, pPen, x1, y1, x2, y2){
  1828.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1829.     return DllCall("gdiplus\GdipDrawLine", Ptr, pGraphics, Ptr, pPen, "float", x1, "float", y1, "float", x2, "float", y2)
  1830. }
  1831. Gdip_DrawLines(pGraphics, pPen, Points){
  1832.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1833.     StringSplit, Points, Points, |
  1834.     VarSetCapacity(PointF, 8*Points0)
  1835.     Loop, %Points0%
  1836.     {
  1837.         StringSplit, Coord, Points%A_Index%, `,
  1838.         NumPut(Coord1, PointF, 8*(A_Index-1), "float"), NumPut(Coord2, PointF, (8*(A_Index-1))+4, "float")
  1839.     }
  1840.     return DllCall("gdiplus\GdipDrawLines", Ptr, pGraphics, Ptr, pPen, Ptr, &PointF, "int", Points0)
  1841. }
  1842. Gdip_FillRectangle(pGraphics, pBrush, x, y, w, h){
  1843.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1844.     return DllCall("gdiplus\GdipFillRectangle", Ptr, pGraphics, Ptr, pBrush, "float", x, "float", y, "float", w, "float", h)
  1845. }
  1846. Gdip_FillRoundedRectangle(pGraphics, pBrush, x, y, w, h, r){
  1847.     Region := Gdip_GetClipRegion(pGraphics)
  1848.     Gdip_SetClipRect(pGraphics, x-r, y-r, 2*r, 2*r, 4)
  1849.     Gdip_SetClipRect(pGraphics, x+w-r, y-r, 2*r, 2*r, 4)
  1850.     Gdip_SetClipRect(pGraphics, x-r, y+h-r, 2*r, 2*r, 4)
  1851.     Gdip_SetClipRect(pGraphics, x+w-r, y+h-r, 2*r, 2*r, 4)
  1852.     E := Gdip_FillRectangle(pGraphics, pBrush, x, y, w, h)
  1853.     Gdip_SetClipRegion(pGraphics, Region, 0)
  1854.     Gdip_SetClipRect(pGraphics, x-(2*r), y+r, w+(4*r), h-(2*r), 4)
  1855.     Gdip_SetClipRect(pGraphics, x+r, y-(2*r), w-(2*r), h+(4*r), 4)
  1856.     Gdip_FillEllipse(pGraphics, pBrush, x, y, 2*r, 2*r)
  1857.     Gdip_FillEllipse(pGraphics, pBrush, x+w-(2*r), y, 2*r, 2*r)
  1858.     Gdip_FillEllipse(pGraphics, pBrush, x, y+h-(2*r), 2*r, 2*r)
  1859.     Gdip_FillEllipse(pGraphics, pBrush, x+w-(2*r), y+h-(2*r), 2*r, 2*r)
  1860.     Gdip_SetClipRegion(pGraphics, Region, 0)
  1861.     Gdip_DeleteRegion(Region)
  1862.     return E
  1863. }
  1864. Gdip_GetClipRegion(pGraphics){
  1865.     Region := Gdip_CreateRegion()
  1866.     DllCall("gdiplus\GdipGetClip", A_PtrSize ? "UPtr" : "UInt", pGraphics, "UInt*", Region)
  1867.     return Region
  1868. }
  1869. Gdip_SetClipRect(pGraphics, x, y, w, h, CombineMode=0){
  1870.    return DllCall("gdiplus\GdipSetClipRect",  A_PtrSize ? "UPtr" : "UInt", pGraphics, "float", x, "float", y, "float", w, "float", h, "int", CombineMode)
  1871. }
  1872. Gdip_SetClipPath(pGraphics, Path, CombineMode=0){
  1873.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1874.     return DllCall("gdiplus\GdipSetClipPath", Ptr, pGraphics, Ptr, Path, "int", CombineMode)
  1875. }
  1876. Gdip_ResetClip(pGraphics){
  1877.    return DllCall("gdiplus\GdipResetClip", A_PtrSize ? "UPtr" : "UInt", pGraphics)
  1878. }
  1879. Gdip_FillEllipse(pGraphics, pBrush, x, y, w, h){
  1880.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1881.     return DllCall("gdiplus\GdipFillEllipse", Ptr, pGraphics, Ptr, pBrush, "float", x, "float", y, "float", w, "float", h)
  1882. }
  1883. Gdip_FillRegion(pGraphics, pBrush, Region){
  1884.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1885.     return DllCall("gdiplus\GdipFillRegion", Ptr, pGraphics, Ptr, pBrush, Ptr, Region)
  1886. }
  1887. Gdip_FillPath(pGraphics, pBrush, Path){
  1888.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1889.     return DllCall("gdiplus\GdipFillPath", Ptr, pGraphics, Ptr, pBrush, Ptr, Path)
  1890. }
  1891. Gdip_CreateRegion(){
  1892.     DllCall("gdiplus\GdipCreateRegion", "UInt*", Region)
  1893.     return Region
  1894. }
  1895. Gdip_DeleteRegion(Region){
  1896.     return DllCall("gdiplus\GdipDeleteRegion", A_PtrSize ? "UPtr" : "UInt", Region)
  1897. }
  1898. Gdip_CreateBitmap(Width, Height, Format=0x26200A){
  1899.     DllCall("gdiplus\GdipCreateBitmapFromScan0", "int", Width, "int", Height, "int", 0, "int", Format, A_PtrSize ? "UPtr" : "UInt", 0, A_PtrSize ? "UPtr*" : "uint*", pBitmap)
  1900.     Return pBitmap
  1901. }
  1902. Gdip_SetSmoothingMode(pGraphics, SmoothingMode){
  1903.    return DllCall("gdiplus\GdipSetSmoothingMode", A_PtrSize ? "UPtr" : "UInt", pGraphics, "int", SmoothingMode)
  1904. }
  1905. Gdip_DrawRectangle(pGraphics, pPen, x, y, w, h){
  1906.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1907.     return DllCall("gdiplus\GdipDrawRectangle", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h)
  1908. }
  1909. Gdip_DrawRoundedRectangle(pGraphics, pPen, x, y, w, h, r){
  1910.     Gdip_SetClipRect(pGraphics, x-r, y-r, 2*r, 2*r, 4)
  1911.     Gdip_SetClipRect(pGraphics, x+w-r, y-r, 2*r, 2*r, 4)
  1912.     Gdip_SetClipRect(pGraphics, x-r, y+h-r, 2*r, 2*r, 4)
  1913.     Gdip_SetClipRect(pGraphics, x+w-r, y+h-r, 2*r, 2*r, 4)
  1914.     E := Gdip_DrawRectangle(pGraphics, pPen, x, y, w, h)
  1915.     Gdip_ResetClip(pGraphics)
  1916.     Gdip_SetClipRect(pGraphics, x-(2*r), y+r, w+(4*r), h-(2*r), 4)
  1917.     Gdip_SetClipRect(pGraphics, x+r, y-(2*r), w-(2*r), h+(4*r), 4)
  1918.     Gdip_DrawEllipse(pGraphics, pPen, x, y, 2*r, 2*r)
  1919.     Gdip_DrawEllipse(pGraphics, pPen, x+w-(2*r), y, 2*r, 2*r)
  1920.     Gdip_DrawEllipse(pGraphics, pPen, x, y+h-(2*r), 2*r, 2*r)
  1921.     Gdip_DrawEllipse(pGraphics, pPen, x+w-(2*r), y+h-(2*r), 2*r, 2*r)
  1922.     Gdip_ResetClip(pGraphics)
  1923.     return E
  1924. }
  1925. Gdip_DrawEllipse(pGraphics, pPen, x, y, w, h){
  1926.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1927.     return DllCall("gdiplus\GdipDrawEllipse", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h)
  1928. }
  1929. Gdip_CreateHBITMAPFromBitmap(pBitmap, Background=0xffffffff){
  1930.     DllCall("gdiplus\GdipCreateHBITMAPFromBitmap", A_PtrSize ? "UPtr" : "UInt", pBitmap, A_PtrSize ? "UPtr*" : "uint*", hbm, "int", Background)
  1931.     return hbm
  1932. }
  1933. SetImage(hwnd, hBitmap){
  1934.     SendMessage, 0x172, 0x0, hBitmap,, ahk_id %hwnd%
  1935.     E := ErrorLevel
  1936.     DeleteObject(E)
  1937.     return E
  1938. }
  1939. Gdip_FillPolygon(pGraphics, pBrush, Points, FillMode=0){
  1940.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  1941.     StringSplit, Points, Points, |
  1942.     VarSetCapacity(PointF, 8*Points0)
  1943.     Loop, %Points0%
  1944.     {
  1945.         StringSplit, Coord, Points%A_Index%, `,
  1946.         NumPut(Coord1, PointF, 8*(A_Index-1), "float"), NumPut(Coord2, PointF, (8*(A_Index-1))+4, "float")
  1947.     }
  1948.     return DllCall("gdiplus\GdipFillPolygon", Ptr, pGraphics, Ptr, pBrush, Ptr, &PointF, "int", Points0, "int", FillMode)
  1949. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement