Gdip Gui Help!!

Ask gaming related questions (AHK v1.1 and older)
henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Gdip Gui Help!!

Post by henriquehassi » 21 Jan 2022, 07:17

hello everyone, I do not know if this would be the correct session for my topic, but I go straight to the subject, I found this software in AHK that uses the gdip library to create the GUI, and it is very beautiful, wanted to understand how I can do a similar, images are stored in Hash within the script and is read by the module

example:

Code: Select all

A_Args.PNG.PorS := Gdip_BitmapFromBase64(0,1,Data.PNG "OMAAAAjCAIAAADpBCqvAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABY9SURBVHhe7ZxZrF3XWcf7SuJ7zp732We8g2fH176J4ymeYl878VQPceNMdtPGdUgCEamQCEiIFyR4Qeob6hvwWOClEPEAVEgIaCUqUYSQGF9CxUuVvqW8wW+t/zrrrLv3PtdOlUJ9yV+7zt5rfWutb/ivbw3nqp/bPsXKg+DkAriKOXBCWwvOtk8DrsfP8HAwTHWeW1lZDrBk4T6Wl51EA666AVe9heLh7AlMlotqcHWb1rqOPqFzXJs5cEJbFzOmeucuLi72B4tZMUnySZyZJ+HJF7NycTiaeVlOlzyoBotpMRW28vlUXiM96mhaPRhi4zjJx3GmZ+qufIL38KFxS3+S5l5m5sy0WCyrpfF42fU+HxpX0Og1uLqtTtbPyUgMlvcnk0mvGu/df/Tul37unXd/+b1f/DX/3Hvzq5Pl/YOhSwxefjweF73xkePnEajJH3vmAvJuqEcZrV5a2bl2+5WvvPPu+6HVPPgN7+HD0rhlHT+0yrz06v1qsHMy2YysGhdoaI0OxmPmwGJRLqa54b3PC67ZVsSMqQoAtEuyEc793t//48cff/zfAb71F39FOdnCuwzh0WhU9oZ7njj821//3f/4/n86UQs+iUdWLLqhHmU0vRSnQ7zx7e98t+YlQAneozZKB2///Pv4oVXmgz/5s5u3vtjrbzaT/bhyuGYI6Xm0uO/kmct2nrhswnCQFWHXcsvBMFWOUACGw2Fe9E+cvvhbX/s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KqncKVTuH4tXJFFq3ANkvFwpUGfMhW472AI18bCFbU1BK5oTlvBVUzhSgO4ijY4iY0ybsi2QRV18dWTVXvW2J5fZ4czjqHZqFeRwRyZXKcbof6B+gfu2yIUEJzQFCpUVzWoCjjRKVzpHIfXYJgqONn5cHIPIfnTA6fxRri6TeFEG3DV/9dQgAm2+Krk6ncCAu+UUO4XWbVSD86eKVT4acF1auGKHgQnPR8zpj7qeEiDtwBkKQjJGm4GBN61HaRWCUytXC+fBj71DjfB1mHq/zeIJTZLbuBrCKXSnxBN/5fxGVMfYYh8nqziaw2iKZCwa/kI4jOmPtoQ/4DoKIi17uPhzis//fiMqVsBjonz4eQeXWzf/j9U7oRg9fU+nwAAAABJRU5ErkJggg==")

and then it uses the image like this

Code: Select all

MHGui.Add("HBITMAP"  , { "Label": "por", "W": 31, "H": 20, "PNG" : "PorS", "Window": ""}, "x230 y1")
however I could not find a simple way to create a GUI like that, could someone help me? I found this above very beautiful and visual, with interactive buttons
Attachments
AutoHotkey_hlkySs6CAF.png
AutoHotkey_hlkySs6CAF.png (36.63 KiB) Viewed 2587 times

User avatar
boiler
Posts: 16913
Joined: 21 Dec 2014, 02:44

Re: Gdip Gui Help!!

Post by boiler » 21 Jan 2022, 07:29

I don’t know if that GUI was created the same way, but check out @Hellbent’s custom GUI image button tool.

henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 21 Jan 2022, 07:31

I had already checked this tool, but it is very difficult to move and very difficult to create buttons, any other ideas?

User avatar
boiler
Posts: 16913
Joined: 21 Dec 2014, 02:44

Re: Gdip Gui Help!!

Post by boiler » 21 Jan 2022, 07:33

You are not going to create GUIs that look like that without significant effort.

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 09:07

henriquehassi wrote:
21 Jan 2022, 07:31
I had already checked this tool, but it is very difficult to move and very difficult to create buttons, any other ideas?
What part are you having troubles with?
This is how you add a button. There is no need to design a button from scratch, there is a default design.
20220121084611.png
20220121084611.png (7.43 KiB) Viewed 2534 times

Code: Select all

;***************************************************************************************************
#Include <My Altered Gdip Lib> ; <----------- GDIP LIB
#Include <Gen 3 Buttons> ; <---------- HButton class
;***************************************************************************************************
#SingleInstance, Force
Gdip_Startup()

Gui, 1:Color, % color := "62666a"

MyFirstButton := New HButton( { Owner: 1 , X: "5" , Y: "+20" , W: 240 , H: 60 , Text: "3" , Label: "DemoLabel" } , { FontSize: 22 , Font: "WebDings" , BackgroundColor: "0xFF" color } )

Gui, 1:Show, w250 h500, Buttons

return
GuiClose:
GuiContextMenu:
*ESC::ExitApp

DemoLabel:
	SoundBeep
	return
The variable "MyFirstButton" contains the hwnd of the control so you can still use most of the GuiControl and GuiControlGet sub-commands.



In regards to the buttons used in your image.

Those look like a button design of mine I released 2-3 years ago.
They are the same buttons that I used for this viewtopic.php?f=6&t=60949

I did a quick look and I still have the original bitmap design in my bitmap maker

20220121085618.png
20220121085618.png (5.58 KiB) Viewed 2534 times
I think that you should be able to strip the button class out of the thread I posted but you would need to find all the components that make up all the functions. The newer button class boiler pointed to has all the guts on the inside of the class so it is simpler to use.

If you know what you are doing, you can create your own button control / button class using the prototype button bitmaps.

Button State: Default / Rest

Code: Select all

HB_BITMAP_MAKER(){
	;Bitmap Created Using: HB Bitmap Maker
	pBitmap := Gdip_CreateBitmap( 96 , 29 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
	Brush := Gdip_BrushCreateSolid( "0xFF343538" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 98 , 31 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 96 , 29 , "0xFF61646A" , "0xFF1E1114" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , 96 , 26 , 5 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 94 , 29 , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , 94 , 24 , 5 ) , Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 95 , 26 , 5 ) , Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Button" , "s12 Center vCenter Bold c" Brush " x1 y1" , "Segoe UI" , 96 , 28 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFcccccc" ) , Gdip_TextToGraphics( G , "Button" , "s12 Center vCenter Bold c" Brush " x0 y0" , "Segoe UI" , 96 , 28 ) , Gdip_DeleteBrush( Brush )
	Gdip_DeleteGraphics( G )
	return pBitmap
}


Button State: Hover

Code: Select all

HB_BITMAP_MAKER(){
	;Bitmap Created Using: HB Bitmap Maker
	pBitmap := Gdip_CreateBitmap( 96 , 29 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
	Brush := Gdip_BrushCreateSolid( "0xFF343538" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 98 , 31 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 96 , 29 , "0xFF61646A" , "0xFF1E1114" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , 96 , 26 , 5 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 94 , 29 , "0xFF55585D" , "0xFF3B3E41" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , 94 , 24 , 5 ) , Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 95 , 26 , 5 ) , Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Button" , "s12 Center vCenter Bold c" Brush " x1 y1" , "Segoe UI" , 96 , 28 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFcccccc" ) , Gdip_TextToGraphics( G , "Button" , "s12 Center vCenter Bold c" Brush " x0 y0" , "Segoe UI" , 96 , 28 ) , Gdip_DeleteBrush( Brush )
	Gdip_DeleteGraphics( G )
	return pBitmap
}
Button State: Pressed

Code: Select all

HB_BITMAP_MAKER(){
	;Bitmap Created Using: HB Bitmap Maker
	pBitmap := Gdip_CreateBitmap( 96 , 29 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
	Brush := Gdip_BrushCreateSolid( "0xFF343538" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 98 , 31 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 96 , 29 , "0xFF2A2C2E" , "0xFF45474E" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , 96 , 26 , 5 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" ) , Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 96 , 21 , 5 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF46474D" ) , Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , 96 , 21 , 5 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , 87 , 22 , "0xFF333639" , "0xFF43474B" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , 93 , 23 , 5 ) , Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 ) , Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 95 , 26 , 5 ) , Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Button" , "s12 Center vCenter Bold c" Brush " x1 y2" , "Segoe UI" , 96 , 28 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFcccccc" ) , Gdip_TextToGraphics( G , "Button" , "s12 Center vCenter Bold c" Brush " x0 y1" , "Segoe UI" , 96 , 28 ) , Gdip_DeleteBrush( Brush )
	Gdip_DeleteGraphics( G )
	return pBitmap
}

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 09:54

This video shows how to create the same simple class structure that I used for the buttons in your first post and the Pixel Predator.

This will help you sort out what is need from the Pixel Predator script or how to make your own simple class using the bitmap code I posted.


henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 21 Jan 2022, 14:10

@Hellbent
U can help me make a button On/OFF ?
on := 1
off := 2
MyFirstButton := New HButton( { Owner:%on% , X: 10 , Y: 50 , W: 100 , H: 50 , Text: "Off" , Label: "On" } )
MySecondButton := New HButton( { Owner:%off% , X: 10 , Y: 50 , W: 100 , H: 50 , Text: "ON" , Label: "Off" } )
i try, but don't work
Create A button when pressed change Text

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 15:06

henriquehassi wrote:
21 Jan 2022, 14:10
@Hellbent
U can help me make a button On/OFF ?
on := 1
off := 2
MyFirstButton := New HButton( { Owner:%on% , X: 10 , Y: 50 , W: 100 , H: 50 , Text: "Off" , Label: "On" } )
MySecondButton := New HButton( { Owner:%off% , X: 10 , Y: 50 , W: 100 , H: 50 , Text: "ON" , Label: "Off" } )
i try, but don't work
Create A button when pressed change Text

It sounds like you want a switch / checkbox?

Do you mean something like this?
Animation.gif
Animation.gif (189.69 KiB) Viewed 2465 times
viewtopic.php?f=6&t=68814

henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 21 Jan 2022, 15:09

Yes that i can create but i like
image.png
image.png (2.25 KiB) Viewed 2462 times
that on/off changing the text

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 15:21

henriquehassi wrote:
21 Jan 2022, 15:09
Yes that i can create but i like
image.png
that on/off changing the text
I think that the simplest way to do that with the current class would be to create two buttons and switch between hiding and showing them.

Perhaps something like this.

Code: Select all


MyLabel:
	if( Tog := !Tog ){
		GuiControl, Show, % MyOnButton
		GuiControl, Hide, % MyOffButton
	}else{
		GuiControl, Show, % MyOffButton
		GuiControl, Hide, % MyOnButton
	}
	return

henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 21 Jan 2022, 15:25

The last question, sorry
image.png
image.png (9.99 KiB) Viewed 2449 times
how i can create a rectangle where the buttons are

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 15:29

Besides the above method. You could also make two copies of the bitmaps and switch between them.
There is an example of altering the bitmaps ( adding a image to the buttons ) somewhere in the button thread. Just look for the image of a button with a emoji on it.

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 15:31

henriquehassi wrote:
21 Jan 2022, 15:25
The last question, sorry
image.png
how i can create a rectangle where the buttons are
Do you mean the background or the purple progress bar?

henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 21 Jan 2022, 15:31

@Hellbent
Background

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 15:37

henriquehassi wrote:
21 Jan 2022, 15:31
@Hellbent
Background
It is just an image. In my case I created the image using gdip, but any image would have done the trick.

Here is how I made the image.

Code: Select all

PixelPredatorBG(){
	;Bitmap Created Using: HB Bitmap Maker
	pBitmap:=Gdip_CreateBitmap( 450 , 300 ) 
	 G := Gdip_GraphicsFromImage( pBitmap )
	Gdip_SetSmoothingMode( G , 4 )
	Brush := Gdip_CreateLineBrush( 66 , 77 , 100 , 100 , "0xFF111111" , "0xFF22005E" , 1 )
	Gdip_FillRectangle( G , Brush , -2 , -2 , 454 , 303 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF252525" )
	Gdip_FillRectangle( G , Brush , 10 , 40 , 430 , 250 )
	Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 0 , 0 , 449 , 299 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawRectangle( G , Pen , 10 , 40 , 430 , 250 )
	Gdip_DeletePen( Pen )
	Brush := Gdip_CreateLineBrush( 14 , 9 , 21 , 22 , "0xFF7200AE" , "0xFF010101" , 1 )
	Gdip_FillRectangle( G , Brush , 5 , 5 , 30 , 30 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrush( 154 , 9 , 182 , 47 , "0xFF7200AE" , "0xFF010101" , 1 )
	Gdip_FillRectangle( G , Brush , 85 , 6 , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrush( 412 , 8 , 418 , 15 , "0xFF7200AE" , "0xFF010101" , 1 )
	Gdip_FillRectangle( G , Brush , 409 , 6 , 15 , 15 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrush( 433 , 9 , 437 , 16 , "0xFF7200AE" , "0xFF010101" , 1 )
	Gdip_FillRectangle( G , Brush , 429 , 6 , 15 , 15 )
	Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 5 , 5 , 30 , 30 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 85 , 6 , 280 , 28 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 409 , 6 , 15 , 15 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 429 , 6 , 15 , 15 )
	Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x-5 y-4" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF999999" )
	Gdip_TextToGraphics( G , "HB" , "s14 Center vCenter Bold c" Brush " x-4 y-3" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x84 y5" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y5" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x86 y5" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x86 y6" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y6" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x84 y6" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x84 y7" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y7" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x86 y7" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF999999" )
	Gdip_TextToGraphics( G , "Pixel Predator" , "s16 Center vCenter Bold c" Brush " x85 y6" , "Segoe UI" , 280 , 28 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x392 y-16" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-16" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x394 y-16" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x394 y-15" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-15" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x392 y-15" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x392 y-14" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-14" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x394 y-14" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF999999" )
	Gdip_TextToGraphics( G , "_" , "s14 Center vCenter Bold c" Brush " x393 y-15" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x412 y-12" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-12" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x414 y-12" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x414 y-11" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-11" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x412 y-11" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x412 y-10" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-10" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF7200AE" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x414 y-10" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF999999" )
	Gdip_TextToGraphics( G , "x" , "s14 Center vCenter Bold c" Brush " x413 y-11" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 449 , 0 , 449 , 300 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 0 , 299 , 449 , 299 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawLine( G , Pen , 11 , 290 , 440 , 290 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawLine( G , Pen , 440 , 40 , 440 , 289 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 35 , 5 , 35 , 35 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 5 , 35 , 35 , 35 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 85 , 34 , 365 , 34 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 365 , 6 , 365 , 34 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 424 , 6 , 424 , 21 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 444 , 6 , 444 , 21 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 429 , 21 , 444 , 21 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 409 , 21 , 424 , 21 )
	Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF333333" )
	Gdip_FillRectangle( G , Brush , 16 , 45 , 419 , 40 )
	Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 15 , 45 , 420 , 40 )
	Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF333333" )
	Gdip_FillRectangle( G , Brush , 16 , 90 , 419 , 40 )
	Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 15 , 90 , 420 , 40 )
	Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF333333" )
	Gdip_FillRectangle( G , Brush , 16 , 135 , 159 , 40 )
	Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 15 , 135 , 160 , 40 )
	Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF333333" )
	Gdip_FillRectangle( G , Brush , 16 , 180 , 419 , 40 )
	Gdip_DeleteBrush( Brush )
	Pen := Gdip_CreatePen( "0xFF777777" , 1 )
	Gdip_DrawRectangle( G , Pen , 15 , 180 , 420 , 40 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 15 , 85 , 435 , 85 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 15 , 130 , 435 , 130 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 15 , 175 , 175 , 175 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 15 , 220 , 435 , 220 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 435 , 45 , 435 , 84 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 435 , 90 , 435 , 129 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 175 , 135 , 175 , 174 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 1 )
	Gdip_DrawLine( G , Pen , 435 , 180 , 435 , 219 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFF000000" , 3 )
	Gdip_DrawEllipse( G , Pen , 290 , 12 , 15 , 15 )
	Gdip_DeletePen( Pen )
	Pen := Gdip_CreatePen( "0xFFF0F0F0" , 1 )
	Gdip_DrawEllipse( G , Pen , 290 , 12 , 15 , 15 )
	Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_FillRectangle( G , Brush , 296 , 7 , 3 , 10 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_FillRectangle( G , Brush , 296 , 22 , 3 , 10 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_FillRectangle( G , Brush , 285 , 18 , 10 , 3 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_FillRectangle( G , Brush , 300 , 18 , 10 , 3 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
	Gdip_FillRectangle( G , Brush , 297 , 8 , 1 , 8 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
	Gdip_FillRectangle( G , Brush , 297 , 23 , 1 , 8 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
	Gdip_FillRectangle( G , Brush , 301 , 19 , 8 , 1 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
	Gdip_FillRectangle( G , Brush , 286 , 19 , 8 , 1 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
	Gdip_FillRectangle( G , Brush , 297 , 19 , 2 , 2 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_TextToGraphics( G , "Var:" , "s12 Center vCenter Bold c" Brush " x319 y41" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
	Gdip_TextToGraphics( G , "Var:" , "s12 Center vCenter Bold c" Brush " x320 y42" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_TextToGraphics( G , "X:" , "s12 Center vCenter Bold c" Brush " x136 y86" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
	Gdip_TextToGraphics( G , "X:" , "s12 Center vCenter Bold c" Brush " x137 y87" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_TextToGraphics( G , "Y:" , "s12 Center vCenter Bold c" Brush " x206 y86" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
	Gdip_TextToGraphics( G , "Y:" , "s12 Center vCenter Bold c" Brush " x207 y87" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_TextToGraphics( G , "W:" , "s12 Center vCenter Bold c" Brush " x275 y86" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
	Gdip_TextToGraphics( G , "W:" , "s12 Center vCenter Bold c" Brush " x276 y87" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" )
	Gdip_TextToGraphics( G , "H:" , "s12 Center vCenter Bold c" Brush " x345 y86" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" )
	Gdip_TextToGraphics( G , "H:" , "s12 Center vCenter Bold c" Brush " x346 y87" , "Arial" , 50 , 50 )
	Gdip_DeleteBrush( Brush )
	Gdip_DeleteGraphics( G )
	return pBitmap
}

henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 21 Jan 2022, 15:39

@Hellbent
thank u very much

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 21 Jan 2022, 15:41

@henriquehassi
NP :thumbup:

henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 22 Jan 2022, 19:55

@Hellbent
My BitMap Create a White Area

Code: Select all

\/ Create Gui
Main := New Custom_Window( x:= 0 , y:= 0 , w:= 500 , h:= 500 , Name:= "5" , Options:= " +AlwaysOnTop" , Title:= "Login Bot" , Background_Bitmap:= LoginPredatorBG() )
Gui,5 :Color,242424 
Main.Show_Window()

MY BackGround_BITMAP \/
LoginPredatorBG(){
    ;Bitmap Created Using: HB Bitmap Maker
    pBitmap:=Gdip_CreateBitmap( 300 , 300 ) 
    G := Gdip_GraphicsFromImage( pBitmap )
    Gdip_SetSmoothingMode( G , 4 )
return pBitmap
}
image.png
image.png (38.33 KiB) Viewed 2304 times
to see a 300x300 white area

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Gdip Gui Help!!

Post by Hellbent » 22 Jan 2022, 21:01

henriquehassi wrote:
22 Jan 2022, 19:55

My BitMap Create a White Area
Try this.
20220122210016.png
20220122210016.png (17.15 KiB) Viewed 2298 times

Code: Select all

;***************************************************************
#Include <My Altered Gdip Lib> ;Gdip Lib
;***************************************************************
#SingleInstance, Force
Gdip_Startup()

Gui, 1:+AlwaysOnTop -DPIScale

;*********************************************************************************************************
Gui, 1:Add, Picture, x0 y0 w300 h300 0xE hwndPicHwnd
pBitmap := HB_BITMAP_MAKER()
hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
Gdip_DisposeImage( pBitmap )
SetImage( PicHwnd , hBitmap )
DeleteObject( hBitmap )
;*********************************************************************************************************

Gui, 1:Show, w300 h300

return
GuiClose:
GuiContextMenu:
*ESC:: ExitApp


HB_BITMAP_MAKER(){
	;Bitmap Created Using: HB Bitmap Maker
	pBitmap := Gdip_CreateBitmap( 300 , 300 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
	Brush := Gdip_BrushCreateSolid( "0xFF32363a" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 302 , 302 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 10 , 10 , 280 , 50 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 9 , 8 , 281 , 54 , "0xFF3399FF" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 10 , 10 , 280 , 50 ) , Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Sample" , "s14 Center vCenter Bold c" Brush " x1 y1" , "Segoe ui" , 90 , 50 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF880000" ) , Gdip_TextToGraphics( G , "Sample" , "s14 Center vCenter Bold c" Brush " x0 y0" , "Segoe ui" , 90 , 50 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 10 , 70 , 280 , 80 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 10 , 70 , 280 , 79 , "0xFF52565a" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 10 , 70 , 280 , 80 ) , Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Sample" , "s14 Center vCenter Bold c" Brush " x1 y61" , "Segoe ui" , 90 , 50 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFF00ff00" ) , Gdip_TextToGraphics( G , "Sample" , "s14 Center vCenter Bold c" Brush " x0 y60" , "Segoe ui" , 90 , 50 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF22262a" , "0xFF000000" , 1 ) , Gdip_FillRectangle( G , Brush , 10 , 160 , 280 , 130 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_CreateLineBrushFromRect( 7 , 158 , 284 , 133 , "0xFF880000" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 10 , 160 , 280 , 130 ) , Gdip_DeletePen( Pen )
	Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Sample" , "s14 Center vCenter Bold c" Brush " x1 y161" , "Segoe ui" , 90 , 50 ) , Gdip_DeleteBrush( Brush )
	Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" ) , Gdip_TextToGraphics( G , "Sample" , "s14 Center vCenter Bold c" Brush " x0 y160" , "Segoe ui" , 90 , 50 ) , Gdip_DeleteBrush( Brush )
	Gdip_DeleteGraphics( G )
	return pBitmap
}

henriquehassi
Posts: 24
Joined: 29 Jul 2020, 17:11

Re: Gdip Gui Help!!

Post by henriquehassi » 22 Jan 2022, 21:40

@Hellbent
Work Thanks

Post Reply

Return to “Gaming Help (v1)”