Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Side Effect Restore Windows From Minimized State...
Message
 
To
11/06/2008 00:40:59
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01322836
Message ID:
01323037
Views:
22
Yup, I create a Forms Collection class that holds a reference to every single form I instnatiate in the application. So far I was able to minimize each modal (Non-MDI) form in the app. Now I have another issue... Seems like every time I find one fix, another problem crops up. When I restore the app, I can only bring back one modal form at a time (which in some situations can look a little funny). This mainly becomes an issue only if the user left a series of modal forms open. That isn't too bad (although I know my users will complain) as much as that when I run ShowDialog() again on the forms to redisplay them in modal state, it runs the Form_Load() event again...which in some forms can completely mess up where the user left off.

I was thinking i'd overload the ShowDialog() method in my template form, and create a version that accepts a parameter to flag that I wanted to skip running the Load() event... But I from this entry point, I don't see any way of preventing the Load() from running. The only way (which I wish to avoid because of the work-load involved) is to modify every single form's Load() event to check for a parameter flagging if the form is being restored or just loaded as normal. I was hoping to add this "ability" into my template form, which all these forms are based on, so I don't have to change each one.

What would be best is to mimic the "Show Desktop" feature of Windows (without affecting other apps). Apparently, whatever that does, when you restore from it my application works perfectly.

>Is there any way you can test to see if a modal form is open before you minimize?
>
>~~Bonnie
>
>
>>I wrote a "idle" timer that minimizes my application after a certain time has passed. When the user attempts to "restore" the window, I trap the WM_WINDOWPOSCHANGING message in the WndProc event, then I display a login form. If they login again properly, I manually restore the form by changing the WindowState to Normal.
>>
>>Here is my problem, if there was a MODAL form open at the time of minimize, when I restore the main application form, the MODAL form does not restore. It stay hidden, but still loaded in memory. I tried to make VISIBLE = TRUE, but the problem is that the form is no longer MODAL.
>>
>>Any suggestions?
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


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.
-Rich Cook
Previous
Reply
Map
View

Click here to load this message in the networking platform