Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
- ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
- ;@Ahk2Exe-Set FileDescription, AHK Dock
- ;@Ahk2Exe-Set FileVersion, 1.0.0.0
- ;@Ahk2Exe-SetInternalName AHK Dock
- ;@Ahk2Exe-SetName GPoints AHK Dock
- ;@Ahk2Exe-SetOrigFileName AHK Dock
- ;@Ahk2Exe-Set ProductName, AHK Menu Launcher
- ;@Ahk2Exe-Set ProductVersion, 1.0.0.0
- ;@Ahk2Exe-Set Description, AHK Dock
- ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
- #SingleInstance,Force
- #Persistent
- #NoEnv
- Menu,tray, NoStandard
- Menu,Tray,Add,Exit
- SetWorkingDir %A_ScriptDir%
- SetBatchLines, -1
- #MaxHotkeysPerInterval 99000000
- #HotkeyInterval 99000000
- #KeyHistory 0
- ListLines Off
- Process, Priority, , A
- SetKeyDelay, -1, -1
- SetMouseDelay, -1
- SetDefaultMouseSpeed, 0
- SetWinDelay, -1
- SetControlDelay, -1
- SendMode Input
- #Include <Gdip_All>
- #Include <GdipHelper>
- pToken:=Gdip_Startup()
- SetRegView, 64
- global Window:=[], Switch:=[], HB_Button:=[]
- Gui,1:Color,222222
- Window.Push( New Window_1( x:=2, y:=2, w:=596, h:=388, Window:=1, Option:="-DPIScale +AlwaysOntop -Caption", Title:="Sample Window"))
- Window.Push( New Window_1( x:=2, y:=2, w:=596, h:=388, Window:=2, Option:="-DPIScale +AlwaysOntop -Caption", Title:="Sample Window2"))
- Window.Push( New Window_1( x:=2, y:=2, w:=596, h:=388, Window:=3, Option:="-DPIScale +AlwaysOntop -Caption", Title:="Sample Window3"))
- Switch.Push( New SWITCH_1( x:=280, y:=45, w:= 100, h:= 30, state:=0, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="FF0000", Switch_Border:="FF0000" , Switch_Border2:="00FF00", Text_Color3:="FF0000", Font_Size:=14 , Text1:="OFF", Text2:="ON", Text_Color1:="FFFF00", Text_Color2:="FF0000",Window:="1", Label:="SwitchC"))
- HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 40 , y:=110 , w := 174 , h := 50 , Button_Color := "0AD7FF" , Button_Background_Color := "222222" , Text := "BROWSE LOGO" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FF0000" , Font_Color_Bottom := "000000" , Window := "1" , Label := "BTN1" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
- HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 40 , y+=60 , w := 174 , h := 50 , Button_Color := "0AD7FF" , Button_Background_Color := "222222" , Text := "CHANGE NAME" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FF00FF" , Font_Color_Bottom := "000000" , Window := "1" , Label := "BTN2" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
- HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 40 , y+=60 , w := 174 , h := 50 , Button_Color := "0AD7FF" , Button_Background_Color := "222222" , Text := "SAVE CHANGES" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "0000FF" , Font_Color_Bottom := "000000" , Window := "1" , Label := "BTN3" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
- Gui,1:Add,Text,x10 y20 w220 h50 gMove BackgroundTrans,
- Gui,1:Font, cWhite s10 Bold, Times New Roman
- Gui,1:Add,Text,x390 y52 w200 r1 BackgroundTrans, AUTO DISPLAY LOGO
- Gui,1:Font,
- Gui,1:Font, cBlack s16, Impact
- Gui,1:Add,Text,x50 y26 w150 r1 Center BackgroundTrans, WIN CHANGER
- Gui,1:Font,
- Gui,1:Font, cYellow s16, Impact
- Gui,1:Add,Text,x52 y28 w150 r1 Center BackgroundTrans, WIN CHANGER
- Gui,1:Font,
- Gui,1:Font, cLime s8 Bold,
- Gui,1:Add,Text,x300 y10 w300 r1 BackgroundTrans, - - V A N H E A R T N E T - -
- Gui,1:Add,Picture, x300 y120 w200 h200 vOEMLogo Border,
- Gui,1:Show,,Sample Window
- SetTimer,HB_Button_Hover,50
- return
- BTN1:
- ;-----------------------------------------------------
- ; In the button label, add the focus grab line
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- ; Add the button press function call and test
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- Gui,2:Submit,Nohide
- SoundBeep, 2000
- ;----------------------------------------------
- Gui,1:+Owndialogs
- FileSelectFile,File,,,,All Files 120x120 (*.*)
- if (Errorlevel=0){
- FileCopy,% File, C:\Windows\OEMLogo.bmp,1
- if (state=1)
- GuiControl,1:,OEMLogo,C:\Windows\OEMLogo.bmp
- ;~ RegRead,RegLogo,HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation,Logo
- ;~ RegDelete,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation,Logo
- ;~ If(Errorlevel=1)
- RegWrite,REG_SZ,HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation,Logo,C:\Windows\OEMLogo.bmp
- ;~ else{
- ;~ RegDelete,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation,Logo
- ;~ MsgBox, Existed
- ;~ }
- ;~ MsgBox,% RegLogo
- }else
- return
- return
- BTN2:
- ;-----------------------------------------------------
- ; In the button label, add the focus grab line
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- ; Add the button press function call and test
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- Gui,2:Submit,Nohide
- SoundBeep, 2000
- ;----------------------------------------------
- Gui,2:Show,,Sample Window2
- return
- BTN3:
- ;-----------------------------------------------------
- ; In the button label, add the focus grab line
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- ; Add the button press function call and test
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- Gui,2:Submit,Nohide
- SoundBeep, 2000
- ;----------------------------------------------
- Gui,3:Add,Text,x10 y20 w220 h50 gMove BackgroundTrans,
- Gui,3:Show,,Sample Window3
- tooltip, yes
- return
- ;Add the hover fuction to the bottom of your script (or go lib route if you know how to)
- HB_Button_Hover(){
- static Index , Hover_On
- MouseGetPos,,,, ctrl , 2
- if( ! Hover_On && ctrl ){
- loop , % HB_Button.Length()
- if( ctrl = HB_Button[ A_Index ].hwnd )
- {
- HB_Button[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On := 1 , break
- SoundBeep,200
- }
- }else if( Hover_On = 1 )
- if( ctrl != HB_Button[ Index ].Hwnd )
- HB_Button[ Index ].Draw_Default() , Hover_On := 0
- }
- SwitchC:
- if(state=0){
- Switch[ A_GuiControl ].Draw_Bitmap_ON()
- ;~ IniWrite,1,gg.ini,sss,aa2
- ;~ Switch.state:=1
- state:=1
- }else{
- Switch[ A_GuiControl ].Draw_Bitmap_OFF()
- ;~ IniWrite,0,gg.ini,sss,aa2
- state:=0
- }
- return
- Move:
- PostMessage,0xA1,2
- return
- Esc::
- GuiClose:
- GuiContextMenu:
- Gdip_Shutdown(pToken)
- ExitApp
- class HB_Flat_Rounded_Button_Type_1 {
- __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, HoverColor:="404040", HoverColor2:="404040", BColor:="404040",TextHover:="FF0000"){
- This.Roundness:=Roundness
- This.Text_Color_Top := "0xFF" Font_Color_Top
- This.Text_Color_Bottom := "0xFF" Font_Color_Bottom
- This.HoverC:="0xFF" HoverColor
- This.HoverC2:="0xFF" HoverColor2
- This.BColor:="0xFF" BColor
- This.Font := Font
- This.Font_Size := Font_Size
- This.Text := Text
- This.TextHover:="0xFF" TextHover
- This.X := x
- This.Y := y
- This.W := w
- This.H := h
- This.Button_Background_Color := "0xFF" Button_Background_Color
- This.Button_Color := "0xFF" Button_Color
- This.Window := Window
- This.Label := Label
- This.Default_Button := Default_Button
- This.Create_Default_Bitmap()
- This.Create_Hover_Bitmap()
- This.Create_Pressed_Bitmap()
- This.Create_Trigger()
- sleep, 20
- This.Draw_Default()
- }
- Create_Trigger(){
- static
- num := HB_Button.Length()+1
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Default_Bitmap(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- ;---------------------------------------------------
- if(This.Default_Button)
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.Button_Color , This.BColor , 1 , 1 ) ; DEFAULT COLOR
- ;-------------------------------------------
- Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 1 ) ;0xFF1A1C1F
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2 " , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1 " , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Hover_Bitmap(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- ;---------------------------------------------------------------------------
- if(This.Default_Button)
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF555851" , "0xFF3B3E41" , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.HoverC , This.HoverC2 , 1 , 1 ) ;HOVER COLOR
- ;----------------------------------------------------------------
- Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 1 ) ; BODER
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom ) ; TEXT BOTTOM COLOR
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2" , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.TextHover ) ;TEXT FONT COLOR
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1" , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Pressed_Bitmap(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF000000" , "0xFF45474E" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H-8 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF46474D" )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , This.W , This.H-8 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- ;------------------------------------------------------------------
- if(This.Default_Button)
- Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF43474B" , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF00FFFF" , 1 , 1 ) ;PRESSED COLOR
- ;-----------------------------------------------------------------------
- Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-3 , This.H-6 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y3" , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y2" , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
- Gdip_DisposeImage( pBitmap )
- }
- Draw_Default(){
- SetImage( This.Hwnd , This.Default_Bitmap )
- }
- Draw_Hover(){
- SetImage( This.Hwnd , This.Hover_Bitmap )
- }
- Draw_Pressed(){
- SetImage( This.Hwnd , This.Pressed_Bitmap )
- SetTimer , HB_Button_Hover , Off
- While( GetKeyState( "LButton" ) )
- sleep , 10
- SetTimer , HB_Button_Hover , On
- MouseGetPos,,,, ctrl , 2
- if( This.Hwnd != ctrl ){
- This.Draw_Default()
- return False
- }else {
- This.Draw_Hover()
- return true
- }
- }
- }
- Class Window_1{
- __New( x:=10, y:=10, w:=602, h:=402, Window:=1, Option:="-DPIScale +AlwaysOntop -Caption", Title:="Sample Window"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.Option:=Option
- This.Title:=Title
- This.Create_Window()
- This.Add_Window()
- This.Create_Window2()
- sleep 20
- if (This.Window=1)
- This.Draw_Window()
- else if (This.Window=3)
- This.Draw_Window2()
- }
- Add_Window(){
- static
- Num:=Window.Length()+1
- Gui, % This.Window " :" This.Option
- Gui, % This.Window ":Add" , Picture,% "x" This.X " y" This.Y " w" This.W " h" This.H " v" Num " hwndhwnd 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Window(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( 602 , 402 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 8 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 35 , 600 , 350 , 20 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF333333" , 39 )
- Gdip_FillRoundedRectangle( G , Brush , -2 , 2 , 244 , 85 , 20 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 8 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 244 , 385 , 20 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF333333" , 39 )
- Gdip_FillRoundedRectangle( G , Brush , 4 , 35 , 591 , 350 , 20 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 24 , 94 , 200 , 270 , 10 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 246 , 94 , 330 , 270 , 10 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF880000" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 10 , 10 , 220 , 60 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 10 , 10 , 220 , 60 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF666666" )
- Gdip_FillRectangle( G , Brush , 20 , 17 , 200 , 44 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF888888" , "0xFFFFFFFF" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 10 , 80 , 579 , 293 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 24 , 94 , 200 , 270 , 5 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 246 , 94 , 330 , 270 , 5 )
- Gdip_DeletePen( Pen )
- Gdip_DeleteGraphics( G )
- This.Draw_1 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Window(){
- SetImage( This.Hwnd , This.Draw_1 )
- }
- Create_Window2(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( 610 , 392 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 8 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 35 , 600 , 350 , 20 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF333333" , 39 )
- Gdip_FillRoundedRectangle( G , Brush , -2 , 2 , 244 , 85 , 20 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 8 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 244 , 385 , 20 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF333333" , 39 )
- Gdip_FillRoundedRectangle( G , Brush , 4 , 3 , 595 , 381 , 20 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 24 , 94 , 200 , 270 , 10 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 246 , 94 , 330 , 270 , 10 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF880000" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 10 , 10 , 220 , 60 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 10 , 10 , 220 , 60 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF666666" )
- Gdip_FillRectangle( G , Brush , 20 , 17 , 200 , 44 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF888888" , "0xFFFFFFFF" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 10 , 80 , 579 , 293 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 24 , 94 , 200 , 270 , 5 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF000000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 246 , 94 , 330 , 270 , 5 )
- Gdip_DeletePen( Pen )
- Gdip_DeleteGraphics( G )
- This.Draw_2 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Window2(){
- SetImage( This.Hwnd , This.Draw_2 )
- }
- }
- ;SWITCH
- Class SWITCH_1{
- __New( x:=10, y:=10, w:= 100, h:= 30, state:=0, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text1:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="1", Label:="SwitchC"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.State:=state
- This.Font_Size := Font_Size
- This.Text_Color3:= "0xFF" Text_Color3
- This.BG_Color:= "0xFF" BG_Color
- This.Switch_BG_Color:= "0xFF" Switch_BG_Color
- This.Switch_F_Color:= "0xFF" Switch_F_Color
- This.Switch_Border:="0xFF" Switch_Border
- This.Switch_Border2:="0xFF" Switch_Border2
- This.Text1:=Text1
- This.Text2:=Text2
- This.Text_Color1:= "0xFF" Text_Color1
- This.Text_Color2:= "0xFF" Text_Color2
- This.Label:=Label
- This.Create_Switch_OFF()
- This.Create_Switch_ON()
- This.Adding_Control()
- sleep 20
- (This.State=0)?(This.Draw_Bitmap_OFF()):(This.Draw_Bitmap_ON())
- }
- Adding_Control(){
- static
- num := Switch.Length()+1
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Switch_OFF(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;background
- Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF333333" , 39 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 104 , 33 )
- Gdip_DeleteBrush( Brush )
- ;rounddedbackground
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 6 , 3 , 89 , 24 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFff0000" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 5 , 3 , 90 , 24 , 5 )
- Gdip_DeletePen( Pen )
- ;backcolor
- Brush := Gdip_BrushCreateSolid( "0xFF666666" )
- Gdip_FillRoundedRectangle( G , Brush , 7 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- ;fontcolor
- Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF404040" , "0xFFffffff" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 7 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFffffff" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 7 , 4 , 50 , 22 , 5 )
- Gdip_DeletePen( Pen )
- ;BACK CIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillEllipse( G , Brush , 16 , 9 , 12 , 12 )
- Gdip_DeleteBrush( Brush )
- ;FONTCIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
- Gdip_FillEllipse( G , Brush , 17 , 10 , 10 , 10 )
- Gdip_DeleteBrush( Brush )
- ;BACK TEXT
- Brush := Gdip_BrushCreateSolid( "0xFFFFFFFF" )
- ;BACK TEXT
- Gdip_TextToGraphics( G , "OFF" , "s12 Center vCenter Bold c" Brush " x50 y-10" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- ;FONT TEXT
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- ;FONT TEXT
- Gdip_TextToGraphics( G , "OFF" , "s12 Center vCenter Bold c" Brush " x51 y-9" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_OFF_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Switch_ON(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;background
- Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF333333" , 39 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 104 , 33 )
- Gdip_DeleteBrush( Brush )
- ;rounddedbackground
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 6 , 3 , 89 , 24 , 5 )
- Gdip_DeleteBrush( Brush )
- ;backcolor
- Brush := Gdip_BrushCreateSolid( "0xFF666666" )
- Gdip_FillRoundedRectangle( G , Brush , 44 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- ;fontcolor
- Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF404040" , "0xFFffffff" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 44 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF00ff00" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 7 , 3 , 89 , 24 , 5 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFFffffff" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 44 , 4 , 50 , 22 , 5 )
- Gdip_DeletePen( Pen )
- ;BACK CIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillEllipse( G , Brush , 76 , 9 , 12 , 12 )
- Gdip_DeleteBrush( Brush )
- ;FONTCIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- Gdip_FillEllipse( G , Brush , 77 , 10 , 10 , 10 )
- Gdip_DeleteBrush( Brush )
- ;BACK TEXT
- Brush := Gdip_BrushCreateSolid( "0xFFFFFFFF" )
- ;BACK TEXT
- Gdip_TextToGraphics( G , "ON" , "s12 Center vCenter Bold c" Brush " x0 y-10" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- ;FONT TEXT
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- ;FONT TEXT
- Gdip_TextToGraphics( G , "ON" , "s12 Center vCenter Bold c" Brush " x1 y-9" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_ON_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Bitmap_ON(){
- SetImage( This.Hwnd , This.Draw_ON_Bitmap )
- }
- Draw_Bitmap_OFF(){
- SetImage( This.Hwnd , This.Draw_OFF_Bitmap )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment