Jump to content
Sign in to follow this  

Preventing gui redraw

Recommended Posts


Hi again

I think I am not understanding something with regards to _WinAPI_Redrawwindow. What I want to do is essentially lock my gui from redrawing regardless if a message is sent to the window until I say otherwise. Can someone help me get my head wrapped around this and if there is another method can you let me know.

I thought this would work. The first line would prevent redraws and the second line would force a redraw. I know the second line works....but how to prevent it? This is obviously wrong and I'm likely on a completely wrong track.



Thanks for the help

Share this post

Link to post
Share on other sites

To prevent redrawing or refreshing of a form or gui

be sure you have it selected by using GUISWITCH() if you have multiple forms

and use GUISetState(@SW_LOCK) and GUISetState(@SW_UNLOCK) to stop refreshing / repainting and to resume it once

your update is complete. I only found this by researching API calls and finding that other languages are using "disable" to work around this. Then when I looked up the other options for GUISetState, I found it. But could not find it by searching help or this forum.

I hope this post is detailed enough so that future searches will find it.


Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.