Hide/Show Mouse in like in Fullscreen Video play [modified]
-
Hi, I'm writing a Media Player. In Fullscreen mode, as you know, the Mouse is hidden and becomes visible whenever you move it a little and hides after sometime. Now I understand that I need to use multithreading to set up a timeout to hide the mouse. My Question is which event should I handle for mouse movements. Should it be MouseMove, MouseHover or any other method? Please advice Here is how I think I will do it if the mouse moves then Show the mouse Start a Timeout When the Timeout expires, Hide the mouse and do the above whenever the mouse moves Thanks...
modified on Wednesday, January 09, 2008 5:07:28 AM
-
Hi, I'm writing a Media Player. In Fullscreen mode, as you know, the Mouse is hidden and becomes visible whenever you move it a little and hides after sometime. Now I understand that I need to use multithreading to set up a timeout to hide the mouse. My Question is which event should I handle for mouse movements. Should it be MouseMove, MouseHover or any other method? Please advice Here is how I think I will do it if the mouse moves then Show the mouse Start a Timeout When the Timeout expires, Hide the mouse and do the above whenever the mouse moves Thanks...
modified on Wednesday, January 09, 2008 5:07:28 AM
Yeah, that sounds right.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Yeah, that sounds right.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Do I need to use MouseMove or MouseHover or both?
-
Do I need to use MouseMove or MouseHover or both?
use MouseMove event for this and run a counter in mousemove event when the counter confirms your condition show the cursor. int move = 0; private void Form1_MouseMove(object sender, MouseEventArgs e) { if (move++ >= 20) { this.Cursor = new Cursor(System.Windows.Forms.Cursors.Arrow.CopyHandle()); this.label1.Cursor = this.Cursor; move = 0; } } Hope it helps.
modified on Wednesday, January 09, 2008 6:45:53 AM