I would like to delay an action for several seconds after the entry of a mouse pointer and a winform graphics for the duration of time Rectangle. What will be one way to do this?
Thanks
C #, .net 2.0, winform
< P> Something like this:
Fixed zero mouseAnchantedVerify your object (object sender, mouse eventsErgus E) {timer delaytimer = new timer (); DelayTimer.Interval = 2000; // 2000msec = 2 seconds delay timer. Tick + = New ElapsedEventHandler (delayTimer_Elapsed); } Stable break delay timer_albsed (object sender, event aRGS) {if (mouse intractable ()) doosing (); (Timer) Sender) .Dispose (); }
can be done more efficiently, but should work: D
Two ways to set MouseInRectangle -> One obtains this current mouse coordinate And control the situation and see what's in it, another method will be a variable that you set incorrectly on the control. Mouse_leave
Comments
Post a Comment