Click here to Skip to main content
15,922,650 members
Home / Discussions / C#
   

C#

 
AnswerRe: accept only numbers Pin
Giorgi Dalakishvili20-Oct-07 2:15
mentorGiorgi Dalakishvili20-Oct-07 2:15 
GeneralRe: accept only numbers Pin
kabutar20-Oct-07 2:18
kabutar20-Oct-07 2:18 
GeneralRe: accept only numbers Pin
Giorgi Dalakishvili20-Oct-07 2:22
mentorGiorgi Dalakishvili20-Oct-07 2:22 
QuestionFind available drives in windows vista Pin
Maxim Rubchinsky20-Oct-07 1:17
Maxim Rubchinsky20-Oct-07 1:17 
AnswerRe: Find available drives in windows vista Pin
ekynox20-Oct-07 12:49
ekynox20-Oct-07 12:49 
QuestionProperties Window in windows programming~ [modified] Pin
SeeBees20-Oct-07 0:17
SeeBees20-Oct-07 0:17 
AnswerRe: Properties Window in windows programming~ Pin
Anthony Mushrow20-Oct-07 3:39
professionalAnthony Mushrow20-Oct-07 3:39 
GeneralRe: Properties Window in windows programming~ Pin
SeeBees20-Oct-07 12:56
SeeBees20-Oct-07 12:56 
QuestionDate Format Pin
mpavas19-Oct-07 23:29
mpavas19-Oct-07 23:29 
AnswerRe: Date Format Pin
Luc Pattyn20-Oct-07 0:11
sitebuilderLuc Pattyn20-Oct-07 0:11 
AnswerRe: Date Format Pin
Guffa20-Oct-07 1:05
Guffa20-Oct-07 1:05 
GeneralRe: Date Format Pin
mpavas20-Oct-07 1:06
mpavas20-Oct-07 1:06 
QuestionHow To Load Assembly Pin
Mohamed Yahia19-Oct-07 23:06
Mohamed Yahia19-Oct-07 23:06 
QuestionHow to do network Diagnostic Pin
jason_mf19-Oct-07 22:43
jason_mf19-Oct-07 22:43 
QuestionRegex -- Replace first match only? Pin
bs999919-Oct-07 18:20
bs999919-Oct-07 18:20 
AnswerRe: Regex -- Replace first match only? Pin
Guffa19-Oct-07 20:46
Guffa19-Oct-07 20:46 
QuestionDrag Event Pin
MasterSharp19-Oct-07 14:55
MasterSharp19-Oct-07 14:55 
AnswerRe: Drag Event Pin
Ravi Bhavnani19-Oct-07 16:39
professionalRavi Bhavnani19-Oct-07 16:39 
GeneralRe: Drag Event Pin
MasterSharp19-Oct-07 16:50
MasterSharp19-Oct-07 16:50 
AnswerRe: Drag Event Pin
Ravi Bhavnani19-Oct-07 16:57
professionalRavi Bhavnani19-Oct-07 16:57 
AnswerRe: Drag Event [modified] Pin
Mike Hankey20-Oct-07 10:33
mveMike Hankey20-Oct-07 10:33 
Questionline to mouse Pin
MasterSharp19-Oct-07 11:23
MasterSharp19-Oct-07 11:23 
AnswerRe: line to mouse Pin
led mike19-Oct-07 11:37
led mike19-Oct-07 11:37 
GeneralRe: line to mouse Pin
MasterSharp19-Oct-07 11:50
MasterSharp19-Oct-07 11:50 
GeneralRe: line to mouse Pin
Luc Pattyn19-Oct-07 12:03
sitebuilderLuc Pattyn19-Oct-07 12:03 
Hi,

some remarks:

1. Are you sure your tick is executed at all? Maybe you did something wrong with the timer.

2. Invalidate() will fail when not executed by the thread that created its object (this).
Make sure you are using the right kind of timer.

3. It is a bad idea to have a Paint routine that uses volatile inputs such as MousePosition:
the Paint handler will be called when you call Invalidate(), but also when Windows decides
it is necessary (e.g. because you are dragging another window over it, at which time the
mouse position does not make sense to your Paint at all).

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google


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.