Jump to content

GUICtrlCreatePic and button click


mary
 Share

Recommended Posts

hi !

I dont know if is it bug or code mistake. my goal is to use GUICtrlCreatePic to load a jpg in all area of my main GUI (Form1) and place a button to be clickable. All is ok but my button seams to be not clickable. Here is my code :

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 471, 382, 192, 146, $WS_POPUP)
$Pic1 = GUICtrlCreatePic("d:\image.jpg", 8, 8, 441, 365)
$Button1 = GUICtrlCreateButton("Button1", 352, 336, 81, 25);, BitOR($BS_CENTER,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
   Case $Button1
   msgbox(1,1,"ok")

EndSwitch
WEnd

thanks for any help

Link to comment
Share on other sites

  • 1 month later...

This was my problem too. Thanks for your answer!

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...