Click here to Skip to main content
15,908,437 members
Home / Discussions / C#
   

C#

 
GeneralRe: Begin printing at row x column y [modified] Pin
Roger CS13-Oct-07 11:29
Roger CS13-Oct-07 11:29 
GeneralRe: Begin printing at row x column y Pin
Roger CS14-Oct-07 15:17
Roger CS14-Oct-07 15:17 
GeneralRe: Begin printing at row x column y Pin
led mike15-Oct-07 4:52
led mike15-Oct-07 4:52 
AnswerRe: Begin printing at row x column y Pin
darkelv14-Oct-07 19:04
darkelv14-Oct-07 19:04 
GeneralRe: Begin printing at row x column y Pin
Roger CS15-Oct-07 4:15
Roger CS15-Oct-07 4:15 
QuestionThread & UI Pin
Archyami12-Oct-07 17:11
Archyami12-Oct-07 17:11 
AnswerRe: Thread & UI Pin
led mike12-Oct-07 20:26
led mike12-Oct-07 20:26 
AnswerRe: Thread & UI Pin
mav.northwind12-Oct-07 20:30
mav.northwind12-Oct-07 20:30 
Hi!
What you describe is just the way it is. The main thread is the only one responsible for updating the UI, i.e. triggering the controls to paint themselves.
Then the main thread is busy doing other things, the controls are not repainted.

When you write that you use a timer, then this information is not enough. There are at least 3 different timers I know of in the BCL, one doing its work on the main thread (System.Windows.Forms.Timer) and the other two working on separate threads (for example, System.Timers.Timer).
If you say that your UI isn't responsive while the timer is running, I guess you're using the first one.

The solution for this kind of problem is to let the "heavy task" run in a separate thread, thus freeing the main thread for updating the UI.

But beware - you cannot update your UI from a different thread than the main UI thread directly. You'll have to use Invoke() or BeginInvoke() for this.

Regards,
mav

--
Black holes are the places where God divided by 0...

GeneralRe: Thread & UI Pin
Archyami12-Oct-07 22:42
Archyami12-Oct-07 22:42 
QuestionDelegate awkwardness---is there a better way? Pin
Domenic Denicola12-Oct-07 16:35
Domenic Denicola12-Oct-07 16:35 
AnswerRe: Delegate awkwardness---is there a better way? Pin
PIEBALDconsult12-Oct-07 16:43
mvePIEBALDconsult12-Oct-07 16:43 
AnswerRe: Delegate awkwardness---is there a better way? Pin
S. Senthil Kumar12-Oct-07 22:45
S. Senthil Kumar12-Oct-07 22:45 
GeneralRe: Delegate awkwardness---is there a better way? Pin
Domenic Denicola13-Oct-07 7:28
Domenic Denicola13-Oct-07 7:28 
QuestionExtracting files from inside a file archive Pin
Luminare12-Oct-07 16:16
Luminare12-Oct-07 16:16 
AnswerRe: Extracting files from inside a file archive Pin
Roger CS13-Oct-07 11:52
Roger CS13-Oct-07 11:52 
GeneralRe: Extracting files from inside a file archive Pin
Luminare14-Oct-07 10:48
Luminare14-Oct-07 10:48 
QuestionSystem.IO.Exception Pin
solutionsville12-Oct-07 13:53
solutionsville12-Oct-07 13:53 
AnswerRe: System.IO.Exception Pin
Dave Kreskowiak12-Oct-07 15:35
mveDave Kreskowiak12-Oct-07 15:35 
GeneralRe: System.IO.Exception Pin
solutionsville12-Oct-07 16:02
solutionsville12-Oct-07 16:02 
GeneralRe: System.IO.Exception Pin
Dave Kreskowiak12-Oct-07 17:00
mveDave Kreskowiak12-Oct-07 17:00 
GeneralRe: System.IO.Exception Pin
solutionsville12-Oct-07 17:07
solutionsville12-Oct-07 17:07 
GeneralRe: System.IO.Exception Pin
Dave Kreskowiak13-Oct-07 3:01
mveDave Kreskowiak13-Oct-07 3:01 
AnswerRe: System.IO.Exception Pin
solutionsville13-Oct-07 9:44
solutionsville13-Oct-07 9:44 
QuestionProblem with launching an external process Pin
Togakangaroo12-Oct-07 10:44
Togakangaroo12-Oct-07 10:44 
AnswerRe: Problem with launching an external process Pin
Ennis Ray Lynch, Jr.12-Oct-07 11:28
Ennis Ray Lynch, Jr.12-Oct-07 11:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.