Madza91 Posted January 3, 2009 Posted January 3, 2009 Hello guys... I was wondering is this AutoIt bug or what? When resize/move controls (labels, edits, buttons...) they are a little blinking... why? Here is a little example, just run it and resize GUI, you will see about what I talking to: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 634, 450, 192, 124, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) GUISetBkColor(0x000000) $Edit1 = GUICtrlCreateEdit("", 8, 8, 617, 433) GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Achilles Posted January 3, 2009 Posted January 3, 2009 It flickers worse with more complicated things like listviews... I still haven't found a solution My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
martin Posted January 3, 2009 Posted January 3, 2009 This is one solution #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global Const $WS_EX_COMPOSITED = 0x2000000 $Form1 = GUICreate("Form1", 634, 450, 192, 124, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS),$WS_EX_COMPOSITED) GUISetBkColor(0x000000) $Edit1 = GUICtrlCreateEdit("", 8, 8, 617, 433) GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Madza91 Posted January 3, 2009 Author Posted January 3, 2009 (edited) WOW!!! This is great man! Edit: Oh no... minimize,maximize and exit buttons in window are bugged?! Why?! Edited January 3, 2009 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
martin Posted January 4, 2009 Posted January 4, 2009 WOW!!! This is great man! Edit: Oh no... minimize,maximize and exit buttons in window are bugged?! Why?!"bugged" ?? I don't find any problem. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Achilles Posted January 4, 2009 Posted January 4, 2009 WOW!!! This is great man! Edit: Oh no... minimize,maximize and exit buttons in window are bugged?! Why?!Like martin, I don't see any problem... However simply dragging the mouse over the input box or whatever it is causes the mouse to flicker between being two different types of cursors. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
martin Posted January 4, 2009 Posted January 4, 2009 Like martin, I don't see any problem... However simply dragging the mouse over the input box or whatever it is causes the mouse to flicker between being two different types of cursors.I don't see that either, the cursor looks fine to me and doesn't change when I move it around the edit, or select some text by dragging.Using 3.3.0.0 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
-Ultima- Posted January 4, 2009 Posted January 4, 2009 (edited) They don't "repaint". That is, when you click-hold using the left mouse button, you won't see any visual feedback. The buttons still work, but it's just a visual feedback thing. If you use non Windows Classic themes too, the mouse hover effects on the buttons don't show. (Aside: Besides the aforementioned bug, from my limited testing, WS_EX_COMPOSITED doesn't seem to work well with anything but simple UIs. If you throw in tabs, for example, controls in the tabs start not being painted correctly) Edited January 4, 2009 by -Ultima- [ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ]
Madza91 Posted January 4, 2009 Author Posted January 4, 2009 (edited) This is bug:When I put mouse over minimize/maximize/exit button, there is no change... I don't know how to explain, I'm bad with English, and I'm made one picture explanation...Do you have this bug?! I tested it on SP2 and SP3, and bug is there...They don't "repaint". That is, when you click-hold using the left mouse button, you won't see any visual feedback. The buttons still work, but it's just a visual feedback thing. If you use non Windows Classic themes too, the mouse hover effects on the buttons don't show.Yes, right that... Edited January 4, 2009 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Achilles Posted January 4, 2009 Posted January 4, 2009 I don't see that either, the cursor looks fine to me and doesn't change when I move it around the edit, or select some text by dragging.Using 3.3.0.0When I move the mouse slowly over the edit control it flickers between the standard cursor and the one that an edit usually has. Anybody else see this? My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
-Ultima- Posted January 4, 2009 Posted January 4, 2009 Nope, I don't. [ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ]
Madza91 Posted January 4, 2009 Author Posted January 4, 2009 Me neither. Ichigo, do you see bug about I talking? ;p [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Achilles Posted January 4, 2009 Posted January 4, 2009 Hmm, that's odd... Maybe I'm crazy.. I'll check in on my desktop when I get back to college (tomorrow).. @n3nE: yes, I see how they don't get repainted... I'm really hoping that there will someday be a solution for this in AutoIt... The flickering causes me to not use resizing just because it looks so unprofessional. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
ResNullius Posted January 4, 2009 Posted January 4, 2009 (edited) Hello guys... I was wondering is this AutoIt bug or what? When resize/move controls (labels, edits, buttons...) they are a little blinking... why? Here is a little example, just run it and resize GUI, you will see about what I talking to: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 634, 450, 192, 124, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) GUISetBkColor(0x000000) $Edit1 = GUICtrlCreateEdit("", 8, 8, 617, 433) GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndIf you add $GUI_CLIPCHILDREN $WS_CLIPCHILDREN (what rasim said) to your styles, that fixes the worst of it. Edited January 4, 2009 by ResNullius
rasim Posted January 4, 2009 Posted January 4, 2009 (edited) n3nEAdd a $WS_CLIPCHILDREN style to the GUI styles. Edit:And remove the $WS_EX_COMPOSITED Edited January 4, 2009 by rasim
martin Posted January 4, 2009 Posted January 4, 2009 n3nEAdd a $WS_CLIPCHILDREN style to the GUI styles. Edit:And remove the $WS_EX_COMPOSITEDYes that's better. Sorry I lead people up the wrong path. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Madza91 Posted January 4, 2009 Author Posted January 4, 2009 Rasim, thank you, now it works Martin, you don't need to sorry [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Madza91 Posted January 4, 2009 Author Posted January 4, 2009 (edited) Oh... Rasim, I added this in my script with RichEdit and StatusBar, and they are still blinking on resizing with your solution -.- Edited January 4, 2009 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
martin Posted January 4, 2009 Posted January 4, 2009 Oh... Rasim, I added this in my script with RichEdit and StatusBar, and they are still blinking on resizing with your solution -.-We would need to see some code to make a sensible reply. If the flicker is solved using $WS_EX_COMPSITED, but you want the buttons to work correctly then maybe you could make it so that you only have the extended style $WS_EX_COMPOSITED when you are resizing the gui. Here is an example #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Const $WM_ENTERSIZEMOVE = 0x231 Const $WM_EXITSIZEMOVE = 0x232 Global Const $WS_EX_COMPOSITED = 0x2000000 Global $style = BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPCHILDREN) $Form1 = GUICreate("Form1", 634, 450, 192, 124, $style) GUISetBkColor(0x000000) $Edit1 = GUICtrlCreateEdit("", 8, 8, 617, 433) GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_ENTERSIZEMOVE,"startmove") GUIRegisterMsg($WM_EXITSIZEMOVE,"endmove") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func startmove() ConsoleWrite("Enter sm" & @CRLF) $style = GUIGetStyle($Form1) GUISetStyle($style[0],BitOr($style[1],$WS_EX_COMPOSITED),$Form1) EndFunc Func endmove() ConsoleWrite("exit sm" & @CRLF) GUISetStyle($style[0],$style[1],$Form1) EndFunc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
rasim Posted January 5, 2009 Posted January 5, 2009 We would need to see some code to make a sensible reply. If the flicker is solved using $WS_EX_COMPSITED, but you want the buttons to work correctly then maybe you could make it so that you only have the extended style $WS_EX_COMPOSITED when you are resizing the gui. Here is an example #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Const $WM_ENTERSIZEMOVE = 0x231 Const $WM_EXITSIZEMOVE = 0x232 Global Const $WS_EX_COMPOSITED = 0x2000000 Global $style = BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPCHILDREN) $Form1 = GUICreate("Form1", 634, 450, 192, 124, $style) GUISetBkColor(0x000000) $Edit1 = GUICtrlCreateEdit("", 8, 8, 617, 433) GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_ENTERSIZEMOVE,"startmove") GUIRegisterMsg($WM_EXITSIZEMOVE,"endmove") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func startmove() ConsoleWrite("Enter sm" & @CRLF) $style = GUIGetStyle($Form1) GUISetStyle($style[0],BitOr($style[1],$WS_EX_COMPOSITED),$Form1) EndFunc Func endmove() ConsoleWrite("exit sm" & @CRLF) GUISetStyle($style[0],$style[1],$Form1) EndFunc Nice trick martin I must add the above code in my script collection
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