Click here to Skip to main content
15,914,221 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to open a MS word file through a label link in the application Pin
Giorgi Dalakishvili29-Jun-07 9:39
mentorGiorgi Dalakishvili29-Jun-07 9:39 
Questionencryption in C of RC4 Pin
NalBH29-Jun-07 7:35
NalBH29-Jun-07 7:35 
AnswerRe: encryption in C of RC4 Pin
Guffa29-Jun-07 8:10
Guffa29-Jun-07 8:10 
Questioncode not being executed Pin
Saamir29-Jun-07 4:20
Saamir29-Jun-07 4:20 
AnswerRe: code not being executed Pin
Luc Pattyn29-Jun-07 4:26
sitebuilderLuc Pattyn29-Jun-07 4:26 
GeneralRe: code not being executed Pin
Saamir29-Jun-07 9:17
Saamir29-Jun-07 9:17 
AnswerRe: code not being executed Pin
Not Active29-Jun-07 4:33
mentorNot Active29-Jun-07 4:33 
AnswerRe: code not being executed Pin
Guffa29-Jun-07 4:43
Guffa29-Jun-07 4:43 
You are blocking the main thread with your loop, so there is no thread that is handling the messages. The timer component is driven by messages from windows, and when there is no thread that handles the messages, the component doesn't get any tick events.

You should handle this without a loop, just disabling the parts of your application that should not be available while the timer is running. You can put a DoEvents() call in the loop for a quick fix, but you have to add code to prevent reentering the function regardless of how you handle it.

If you need a loop to do some heavy work, you should do that in a backgrond/worker thread instead of in the main thread.


---
single minded; short sighted; long gone;

GeneralRe: code not being executed Pin
Saamir29-Jun-07 5:03
Saamir29-Jun-07 5:03 
AnswerRe: code not being executed Pin
Guffa29-Jun-07 6:49
Guffa29-Jun-07 6:49 
GeneralRe: code not being executed Pin
Saamir29-Jun-07 9:16
Saamir29-Jun-07 9:16 
GeneralRe: code not being executed Pin
Luc Pattyn29-Jun-07 10:25
sitebuilderLuc Pattyn29-Jun-07 10:25 
AnswerRe: code not being executed Pin
Guffa29-Jun-07 12:10
Guffa29-Jun-07 12:10 
AnswerRe: code not being executed Pin
leppie29-Jun-07 4:48
leppie29-Jun-07 4:48 
AnswerRe: code not being executed Pin
Guffa29-Jun-07 6:38
Guffa29-Jun-07 6:38 
AnswerRe: code not being executed Pin
Martin#29-Jun-07 8:52
Martin#29-Jun-07 8:52 
GeneralRe: code not being executed Pin
Saamir29-Jun-07 9:12
Saamir29-Jun-07 9:12 
GeneralRe: code not being executed Pin
Martin#29-Jun-07 9:44
Martin#29-Jun-07 9:44 
GeneralRe: code not being executed Pin
Luc Pattyn29-Jun-07 9:14
sitebuilderLuc Pattyn29-Jun-07 9:14 
GeneralRe: code not being executed [modified] Pin
Martin#29-Jun-07 9:40
Martin#29-Jun-07 9:40 
GeneralRe: code not being executed Pin
Luc Pattyn29-Jun-07 10:16
sitebuilderLuc Pattyn29-Jun-07 10:16 
QuestionSense Open Excel Workbooks Pin
jeffbeagle29-Jun-07 4:01
jeffbeagle29-Jun-07 4:01 
QuestionActiveX Persistence in C# Pin
zam66429-Jun-07 3:58
zam66429-Jun-07 3:58 
QuestionCount Array Items with C# Pin
BenjaminMartin29-Jun-07 3:55
BenjaminMartin29-Jun-07 3:55 
AnswerRe: Count Array Items with C# Pin
Luc Pattyn29-Jun-07 4:28
sitebuilderLuc Pattyn29-Jun-07 4: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.