Hello everyone,
So I have a small window that is one image, the background graphic to the software.
I add a button over it, however, when the button is clicked in goes to the action that happens when the background is clicked.
i did a search and saw some recommending to detect the location of the button and based on that do an action. Others suggested glables and vlables and I tried all that (not the position method as I want to avoid that, too hard for me).
The main idea is that I should be able to tell each button what to do and it should not default to the action that happens if someone clicks the background image of the software.
Thank You
Buttons on full screen GUI hit the background image Topic is solved
Re: Buttons on full screen GUI hit the background image Topic is solved
I stripped my entire program so I can do a basic test of just two photos, a background and one button, I was hoping to find the problem like that but failed.
Here is the code, any tips would be appreciated
#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
Gui Add, Picture, x-8 y-16 w489 h389 gIm1, img1.png
Gui Add, Picture, x192 y136 w110 h110 +BackgroundTrans gIm2, img2.png
Gui Show, w481 h381, Window
Return
im1:
msgbox, hello you clicked on background
return
im2:
msgbox, hello you clicked on button
return
GuiEscape:
GuiClose:
ExitApp
Here is the code, any tips would be appreciated
#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
Gui Add, Picture, x-8 y-16 w489 h389 gIm1, img1.png
Gui Add, Picture, x192 y136 w110 h110 +BackgroundTrans gIm2, img2.png
Gui Show, w481 h381, Window
Return
im1:
msgbox, hello you clicked on background
return
im2:
msgbox, hello you clicked on button
return
GuiEscape:
GuiClose:
ExitApp