Jump to content

Possible bug: GUICtrlSetBkColor


atomman
 Share

Recommended Posts

I'm very new to AutoIt and coding in general, so i didn't want to dump this in the bug box without confirming. See sig for versions.

Run it, then do one of the following:

- click down on the "drag" area, release, and the MsgBox appears

- click the button and you may get multiple instances of the MsgBox

- comment out GUICtrlSetBkColor and it works as it should

- change GUICtrlCreateButton to GUICtrlCreateLabel and it works fine

#include <GUIConstants.au3>

$Form1 = GUICreate("Form1", 120, 25, -1, -1)
$Button1 = GUICtrlCreateButton("Button1", 0, 0, 75, 25, 0)
; if comment out below, problem disappears
GUICtrlSetBkColor(-1, 0x20A107)
$Label1 = GUICtrlCreateLabel("drag", 88, 0, 25, 25, -1, $GUI_WS_EX_PARENTDRAG)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            MsgBox(0, "", "did i open without clicking button? or multiple times?")
    EndSwitch
WEnd
Edited by atomman
Link to comment
Share on other sites

I'm very new to AutoIt and coding in general, so i didn't want to dump this in the bug box without confirming. See sig for versions.

Run it, then do one of the following:

- click down on the "drag" area, release, and the MsgBox appears

- click the button and you may get multiple instances of the MsgBox

- comment out GUICtrlSetBkColor and it works as it should

- change GUICtrlCreateButton to GUICtrlCreateLabel and it works fine

#include <GUIConstants.au3>

$Form1 = GUICreate("Form1", 120, 25, -1, -1)
$Button1 = GUICtrlCreateButton("Button1", 0, 0, 75, 25, 0)
; if comment out below, problem disappears
GUICtrlSetBkColor(-1, 0x20A107)
$Label1 = GUICtrlCreateLabel("drag", 88, 0, 25, 25, -1, $GUI_WS_EX_PARENTDRAG)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            MsgBox(0, "", "did i open without clicking button? or multiple times?")
    EndSwitch
WEnd
Beta works fine, release is where I was able to duplicate the problem.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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...