JRowe Posted September 20, 2009 Posted September 20, 2009 (edited) I have a button, which on loading appears perfectly fine. After clicking on the Play button, nothing changes, so it's not a universal GUI event. After clicking the Stop button, however, the button frame appears, and won't go away. The search terms turn up a million unrelated things, so I thought I'd ask. Anyone know what causes this problem? $Button1 = GUICtrlCreateButton("", 152, 69, 32, 32, BitOR($BS_DEFPUSHBUTTON,$BS_PUSHBOX,$BS_FLAT,$BS_ICON,$WS_GROUP)) GUICtrlSetImage(-1, "buttons.dll", -8) GUICtrlSetTip(-1, "Start") $Button2 = GUICtrlCreateButton("", 272, 69, 75, 33, BitOR($BS_PUSHBOX,$BS_FLAT,$BS_ICON,$WS_GROUP)) GUICtrlSetImage(-1, "buttons.dll", -12) GUICtrlSetTip(-1, "Stop") $Button2 is displaying the undesired behavior. I simply want the icon as a button without the frame. Edited September 20, 2009 by JRowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center]
Yashied Posted September 20, 2009 Posted September 20, 2009 Use GUICtrlCreatePic() instead of Button. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
JRowe Posted September 20, 2009 Author Posted September 20, 2009 I know that I can create a picture that acts like a button. I'm asking how to make the button work correctly. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center]
Yashied Posted September 20, 2009 Posted September 20, 2009 Nohow for brute-force styles. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
JRowe Posted September 20, 2009 Author Posted September 20, 2009 I'm not gonna buy that buttons don't work. Some sort of style message can be sent. _GUICtrlButton_SetStyle($Button1, BitOR($BS_ICON,$BS_PUSHBOX, $BS_FLAT, $WS_GROUP)) Like that, or some other method. #Include <GuiButton.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> GUICreate("Test GUI", 200, 200) ; will create a dialog box that when displayed is centered $Button1 = GUICtrlCreateButton("Test Button", 50, 50, 32, 32, BitOR($BS_ICON,$BS_PUSHBOX, $BS_FLAT, $WS_GROUP)) GUICtrlSetImage(-1, "shell32.dll", -12) GUISetState() _GUICtrlButton_SetState($Button1, False) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete(); Exit Case $Button1 _GUICtrlButton_SetStyle($Button1, BitOR($BS_ICON,$BS_PUSHBOX, $BS_FLAT, $WS_GROUP)) _GUICtrlButton_SetState($Button1, False) EndSwitch WEnd [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center]
JRowe Posted September 20, 2009 Author Posted September 20, 2009 (edited) Alright, along with the no-dotted focus lines UDF, I was able to do this: #Include <GuiButton.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> ;#include <noFocus.au3> ;_NoFocusLines_Global() GUICreate("Test GUI", 200, 200) ; will create a dialog box that when displayed is centered $Button1 = GUICtrlCreateButton("", 50, 50, 32, 32, bitor($BS_ICON, $BS_PUSHBOX)) GUICtrlSetImage(-1, "shell32.dll", -12) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete(); ;DllCallBackFree($hNoFocusLines_Proc) Exit Case $Button1 _GUICtrlButton_SetStyle($Button1, BitOR($BS_ICON,$BS_PUSHBOX)) EndSwitch WEnd Uncomment if you have the noFocus udf, otherwise, imagine it without the dotted focus lines. Thank you, though,Yashied. Edited September 20, 2009 by JRowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center]
Yashied Posted September 20, 2009 Posted September 20, 2009 Heh, I said at the beginning that GUICtrlCreatePic() much easier. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now