Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form turns to a White Screen 2

Status
Not open for further replies.

cretanion

Technical User
Jan 28, 2002
53
US
When I startup my application written in VB 2005, I get it running, click on another application like MS Excel, go back to my VB application to check it and the Form is all White and in the Title Bar it is not responding. Actually it is still working. How do I go from another application back to mine without getting the White Screen effect?

Thanks for any response...
 
The white screen effect is because your form hasn't redrawn yet. If you don't have a lot of memory, this could take a bit. If you let VS create the form, it should have entered a redrawn command when it gets focus.
 
I have 1 GB of memory. Is there some code I need to write if I return to the program.? I am not aware of where this goes or am familiar with what code to write.

Thanks...
 
See my response in thread732-1207438.
A blank form is often caused by updating it from a different thread.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Is the application actually working on anything when it loses focus? Off loading any processes from the primary thread to a worker thread will help keep the screen refreshing correctly. But if the app is not working on anything and is turning white when you task swap back I would look into other posibilities. Do you have any methods running on focus, activate, or any other events that will fire when the app get's brought to the fore ground? Do you have any custom code in paint methods?

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
The application is working at the time of the white screen. Your comments, "Off loading any processes from the primary thread to a worker thread will help keep the screen refreshing correctly" is something I am not familiar with. I have 1 Drop down box, 2 text boxes and a progressbar running at the time, while the app is running.

-cretanion
 
You have those objects on your form, but is there any code that is being executed? Is the application communicating with a database? Is some I/O function being performed? Are you waiting on some sort of response?

If so, you should look into moving that code into a different thread. There are a few FAQs here on threading, and plenty more on the web.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
With all the responses I have started to read up on Threading. Thanks you for your comments.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top