FoxPro Programming
Detect form restore after minimize
Gravatar is a globally recognized avatar based on your email address. Detect form restore after minimize
  Michael Hogan (Ideate Hosting)
  All
  Jan 25, 2017 @ 03:59pm

I'm creating a pretty titlebar to replace the default titlebar (similar to the vfpx themedtitlebar but more lightweight). It's working pretty well. I set TitleBar=0 to hide the vfp default titlebar but I find that when I minimize the form (Windowstate=1) I also need to set TitleBar=1 for the 'restore' button to fire.

All that is OK, but when I 'restore' the form, I then need to turn the titlebar off again (TitleBar=0) - but I cannot figure out how to detect when that happens. When I restore the form from a minimized state, Refresh() is not fired and Show() is not fired and if I add a windowstate_assign method then even that new method is not activated when the form is restored.

In other words, doing a 'restore' from a minimized form does not seem to trigger and detectable events as far I I can tell.

Suggestions?

Gravatar is a globally recognized avatar based on your email address. re: Detect form restore after minimize
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Jan 26, 2017 @ 12:13am

You probably need to hook a Windows event with BindEvents and capture SendMessage messages.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Detect form restore after minimize
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  Feb 1, 2017 @ 01:56pm

Interestingly enough, it appears WM_MDIRESTORE does not fire when a minimized window it restored...

© 1996-2024