Buttons on full screen GUI hit the background image Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
BScripting

Buttons on full screen GUI hit the background image

17 Oct 2017, 09:40

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. :thumbdown:
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
BScripting

Re: Buttons on full screen GUI hit the background image  Topic is solved

17 Oct 2017, 12:50

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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Joey5, Rohwedder and 387 guests