Controls Painting Problem
-
I have a form that I have show up when a lengthy process (doing a search through files) is ongoing basically as a status window. The trouble is that controls don't paint properly. Below is a link to a picture of what it kind of looks like (the left side of the form didn't capture well for some reason although it actually correctly displays): Here[^] How can I resolve this? :confused:
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
-
I have a form that I have show up when a lengthy process (doing a search through files) is ongoing basically as a status window. The trouble is that controls don't paint properly. Below is a link to a picture of what it kind of looks like (the left side of the form didn't capture well for some reason although it actually correctly displays): Here[^] How can I resolve this? :confused:
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
Without knowing anything about how your searching for files, your threading setup, form and code details, ... There's nothing we can do to help. All we know is, your searching for files and trying to display a progress form. Since there are about a dozen different ways of doing this, it's a bit hard to help you with a description of "My code doesn't work, help!" RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
I have a form that I have show up when a lengthy process (doing a search through files) is ongoing basically as a status window. The trouble is that controls don't paint properly. Below is a link to a picture of what it kind of looks like (the left side of the form didn't capture well for some reason although it actually correctly displays): Here[^] How can I resolve this? :confused:
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
As Dave said its hard to help you without more details. But my guess would be you do you operation in the same thread as the GUI. If you do this the GUI doesn't get the time to repaint itself. If this is the case you have two options: 1. Make your search in a seperate thread (better). 2. Try to call System.Windows.Forms.Application.DoEvents() regulary - but not too often (faster to implement but not very clean and probably slower).
-
As Dave said its hard to help you without more details. But my guess would be you do you operation in the same thread as the GUI. If you do this the GUI doesn't get the time to repaint itself. If this is the case you have two options: 1. Make your search in a seperate thread (better). 2. Try to call System.Windows.Forms.Application.DoEvents() regulary - but not too often (faster to implement but not very clean and probably slower).
My search and the GUI were in a single thread. Thanks for your help and sorry for a lack of more information (to both you and Dave), but I think you have given me the direction in which to go in to solve my problem. :)
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."