Click here to Skip to main content
15,900,725 members
Home / Discussions / C#
   

C#

 
Questiongetting Bios date from c# in win64 environments Pin
Fred 3417-Oct-09 7:17
Fred 3417-Oct-09 7:17 
AnswerRe: getting Bios date from c# in win64 environments Pin
Abhijit Jana17-Oct-09 8:24
professionalAbhijit Jana17-Oct-09 8:24 
GeneralRe: getting Bios date from c# in win64 environments Pin
Fred 3417-Oct-09 9:09
Fred 3417-Oct-09 9:09 
GeneralRe: getting Bios date from c# in win64 environments Pin
Richard MacCutchan17-Oct-09 9:30
mveRichard MacCutchan17-Oct-09 9:30 
GeneralRe: getting Bios date from c# in win64 environments Pin
Abhijit Jana17-Oct-09 9:58
professionalAbhijit Jana17-Oct-09 9:58 
AnswerRe: getting Bios date from c# in win64 environments Pin
Vimalsoft(Pty) Ltd17-Oct-09 8:58
professionalVimalsoft(Pty) Ltd17-Oct-09 8:58 
AnswerRe: getting Bios date from c# in win64 environments Pin
dan!sh 17-Oct-09 9:49
professional dan!sh 17-Oct-09 9:49 
AnswerRe: getting Bios date from c# in win64 environments Pin
Dave Kreskowiak18-Oct-09 2:34
mveDave Kreskowiak18-Oct-09 2:34 
QuestionTextObject in CrystalReport Pin
ZeinabTavana17-Oct-09 6:52
ZeinabTavana17-Oct-09 6:52 
Questiongetting biosdate Pin
Fred 3417-Oct-09 5:58
Fred 3417-Oct-09 5:58 
AnswerRe: getting biosdate Pin
Not Active17-Oct-09 10:31
mentorNot Active17-Oct-09 10:31 
GeneralRe: getting biosdate Pin
Luc Pattyn17-Oct-09 12:17
sitebuilderLuc Pattyn17-Oct-09 12:17 
GeneralRe: getting biosdate Pin
Not Active17-Oct-09 16:21
mentorNot Active17-Oct-09 16:21 
QuestionWhile MouseDown Pin
Zap-Man17-Oct-09 3:27
Zap-Man17-Oct-09 3:27 
AnswerRe: While MouseDown Pin
Lyon Sun17-Oct-09 4:00
Lyon Sun17-Oct-09 4:00 
GeneralRe: While MouseDown Pin
Zap-Man17-Oct-09 4:09
Zap-Man17-Oct-09 4:09 
AnswerRe: While MouseDown Pin
Richard MacCutchan17-Oct-09 4:44
mveRichard MacCutchan17-Oct-09 4:44 
AnswerRe: While MouseDown PinPopular
Luc Pattyn17-Oct-09 5:08
sitebuilderLuc Pattyn17-Oct-09 5:08 
Hi,

this is all wrong.

1. event handlers get executed on the main thread (aka GUI thread), hence MouseUp cannot do anything as long as MouseDown is active.

2. Your while loop will never exit.

3. Your while loop has no delay, so at what rate will VolumeDown be called?

4. Using Thread.Sleep would not be a good approach as that blocks the GUI; using a timer (a Windows.Forms.Timer) is the perfect solution: start the timer on MouseDown, stop it on MouseUp (or better yet have the Tick handler check Control.MouseButtons).


Zap-Man wrote:
I don't want to use a timer


why? because you don't understand them? because you don't like a clean and natural solution?

Smile | :)

Luc Pattyn

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages

Local announcement (Antwerp region): Lange Wapper? Neen!


GeneralRe: While MouseDown Pin
Zap-Man17-Oct-09 5:43
Zap-Man17-Oct-09 5:43 
GeneralRe: While MouseDown Pin
Not Active17-Oct-09 6:17
mentorNot Active17-Oct-09 6:17 
AnswerRe: While MouseDown Pin
Not Active17-Oct-09 5:42
mentorNot Active17-Oct-09 5:42 
GeneralRe: While MouseDown Pin
Zap-Man17-Oct-09 5:46
Zap-Man17-Oct-09 5:46 
GeneralRe: While MouseDown Pin
Not Active17-Oct-09 6:15
mentorNot Active17-Oct-09 6:15 
AnswerRe: While MouseDown Pin
dojohansen18-Oct-09 0:49
dojohansen18-Oct-09 0:49 
QuestionOwner drawn TabControl doesn't act as I want it Pin
WebMaster17-Oct-09 0:20
WebMaster17-Oct-09 0:20 

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.