Jump to content
Sign in to follow this  
kgreer

disable minimize, maximize, close

Recommended Posts

kgreer

I'm trying to disable the entire form while a function is running. I can disable each control using guictrlsetstate(), but I also want to disable the minimize, maximize, and close buttion while the function is running. I tried using guictrlsetstate() on the form as well, but that did not work. Any thoughts?

Share this post


Link to post
Share on other sites
funkey

Search for EnableMenuItem in forum


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites
kgreer

GuiSetState(@SW_Disable,$winhandle)

msgbox(262160,"","An error message")

;controls are reset

GuiSetState(@SW_Enable,$winhandle)

This works, but the form window will minimize itself after the msgbox is closed. I'm not sure what is causing that. I can counteract that by adding winsetontop(), but I don’t want to force the window to always be on top.

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  

×