Achilles Posted October 19, 2009 Share Posted October 19, 2009 (edited) Due to resizing problems and flickering problems with listviews I have decided to try use the old style window drag. By this I mean that when you start dragging instead of the window moving all there is is a frame for where you window will be when you stop dragging. I have tried most of the normal and extended GUI styles with not luck. If you don't know what I'm talking about ask and I'll try to explain more. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("My GUI", 500, 500, -1, -1, $WS_SIZEBOX, $WS_EX_WINDOWEDGE ) ; will create a dialog box that when displayed is centered GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Edited October 19, 2009 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
martin Posted October 19, 2009 Share Posted October 19, 2009 (edited) Due to resizing problems and flickering problems with listviews I have decided to try use the old style window drag. By this I mean that when you start dragging instead of the window moving all there is is a frame for where you window will be when you stop dragging. The way the window is displayed while dragging is set by a desktop property. Desktop Properties| Appearance|Effects|Show Windows Contents while dragging. (At least in XP)You could write some code to do a similar thing. You could have a child popup window in your main gui, and place all the controls on the child. When you resize the main window the child stays the same size and so, I suppose, no flicker. On EXITSIZEMOVE set the child size the to the main window client size and poof!, it's done. Well I'm guessing, but it sounds believable to me. Or maybe there is some way to use WM_SIZE and validate the window so that it isn't redrawn while resizing.Can you give an example of a gui which shows the problem you have? Edited October 19, 2009 by martin 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. Link to comment Share on other sites More sharing options...
Malkey Posted October 19, 2009 Share Posted October 19, 2009 This working example of the script copied from here by Siao may help.expandcollapse popup#include <GUIConstantsEx.au3> #include <Misc.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) ;~ Global Const $WM_ENTERSIZEMOVE = 0x231 Global Const $WM_EXITSIZEMOVE = 0x232 ;~ Global Const $WM_SETREDRAW = 0x000B ;Const $WM_SYSCOMMAND = 0x0112 Const $SC_MOVE = 0xF010 Const $SC_SIZE = 0xF000 Global $OldParam $parent = GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) ;~ GUIRegisterMsg($WM_ENTERSIZEMOVE, "WM_ENTERSIZEMOVE") GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Button = GUICtrlCreateButton("Button", 50, 100, 100, 21) GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) Switch BitAND($wParam, 0xFFF0) Case $SC_MOVE, $SC_SIZE ;Const $SPI_SETDRAGFULLWINDOWS = 37 ;Const $SPI_GETDRAGFULLWINDOWS = 38 ;Const SPIF_SENDWININICHANGE = 2 $tBool = DllStructCreate("int") DllCall("user32.dll", "int", "SystemParametersInfo", "int", 38, "int", 0, "ptr", DllStructGetPtr($tBool), "int", 0) $OldParam = DllStructGetData($tBool, 1) DllCall("user32.dll", "int", "SystemParametersInfo", "int", 37, "int", 0, "ptr", 0, "int", 2) EndSwitch EndFunc ;==>On_WM_SYSCOMMAND Func WM_EXITSIZEMOVE() DllCall("user32.dll", "int", "SystemParametersInfo", "int", 37, "int", $OldParam, "ptr", 0, "int", 2) EndFunc ;==>WM_EXITSIZEMOVE Func _Exit() Exit EndFunc ;==>_Exit milos83 1 Link to comment Share on other sites More sharing options...
Achilles Posted October 19, 2009 Author Share Posted October 19, 2009 This working example of the script copied from here by Siao may help. ..code Thanks! My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
KaFu Posted June 9, 2010 Share Posted June 9, 2010 Siaos code proves it's awesomeness again and again , just what I was looking for to avoid the flicker on resizing SMFs report GUI! Sad he seems not to be around anymore... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
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