Sign in to follow this  
Followers 0
erebus

Problem with GUICtrlCreatePic

3 posts in this topic

#1 ·  Posted (edited)

Hello all,

I am trying to create a GUI window with a picture background and some buttons on it. Although I can do this, the mouse seems not to correspond when trying to click the buttons; however I can press the buttons using the keyboard. Here is my sample code:

#include <GUIConstants.au3>
$menu = GUICreate("my menu", 600, 200)
GUICtrlCreatePic("image.jpg", 0, 0, 600, 200)

$button1 = GUICtrlCreateButton ("1st option", 491, 30, 100)
$button2 = GUICtrlCreateButton ("2nd option", 491, 60, 100)
$button3 = GUICtrlCreateButton ("3rd option", 491, 90, 100)
$exit = GUICtrlCreateButton ("Exit", 491, 165, 100)

GUISetState(@SW_SHOW, $menu)

While 1
    $msg = GUIGetMsg()
    
    Select
    Case $msg = $exit Or $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $button1
        ExitLoop
    Case $msg = $button2
        ExitLoop
    Case $msg = $button3
        ExitLoop
    EndSelect

Wend

What am I doing wrong? Any ideas?

Thank you all in advance.

Edited by erebus

Share this post


Link to post
Share on other sites



i think you have to disable the pic to get the buttons to work correctly


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

I think you are very right.

Thanks a lot. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0