How to reduce flickering in Gui Resize?
-
- Posts: 39
- Joined: 28 Jun 2020, 18:46
How to reduce flickering in Gui Resize?
Is there any method or technique to reduce flickering when resizing a Gui and its controls? I tried Gui.Opt('Ex0x02000000') but it didn't work.
Re: How to reduce flickering in Gui Resize?
I believe you're looking for Redraw.
-
- Posts: 39
- Joined: 28 Jun 2020, 18:46
Re: How to reduce flickering in Gui Resize?
I already tried that too. In fact, even a simple GUI with just an EditControl flickers when resizing by dragging the window border.
I also tried to insert a small delay in the Gui_Size(GuiObj, MinMax, Width, Height) function, but it still doesn't work.
It's not a problem per se as the script is perfectly functional, it's more of a minor annoyance though and I thought maybe there was some way around this limitation.
I also tried to insert a small delay in the Gui_Size(GuiObj, MinMax, Width, Height) function, but it still doesn't work.
It's not a problem per se as the script is perfectly functional, it's more of a minor annoyance though and I thought maybe there was some way around this limitation.
- FanaticGuru
- Posts: 1908
- Joined: 30 Sep 2013, 22:25
Re: How to reduce flickering in Gui Resize?
pedro45_vs wrote: ↑05 Sep 2023, 18:10Is there any method or technique to reduce flickering when resizing a Gui and its controls? I tried Gui.Opt('Ex0x02000000') but it didn't work.
Unfortunately, resizing a window in Windows typically causes all kinds of ugliness in the controls that are actually moving and need to be redrawn.
If I drag the bottom-right resize on this window in Edge right now, the right edge and right scroll bar is quite jittery and ugly. Same with Excel or pretty much any other window. Things that actually move and need to be redrawn, happens in little jerky jumps.
+E0x02000000 +E0x00080000 can sometimes help but it is not a cure all. You show Ex0x02000000'. I am not sure if that is valid but that is not the way the documents show it or the way I do it. Docs say + or - E then a hex number. I would do it Gui.Opt('+E0x02000000'). If you have controls on top of other controls, then draw order and buffering can be especially important.
Maybe if you post an actual working example of your GUI code then others can offer advice for improving.
FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks