c# - Can't scroll like a phone when over labels -


Then I was using code from this link,

But I ran into an issue, in that form if the user clicks on a label and tries to scroll, then he will not go ahead so I set an event on the labels using the same method

  lbl.MouseDown + = New MouseEventHandler (This Q & A Panilmouse Daun); Lbl.MouseMove + = New MouseEventHandler (This is the Q & A: PanelMouseMove);  

With this, when you click on a label, it scrolls to super fast, for this to adjust, I tried to make a new method for mouse move, but +5 And changed the +1 to +1 and -1 It slowed down, but there is not enough space in it, so I can not go slower than 1 or 1.

I think the issue relates to the place that it has been sent to label, not the panel, but it actually thinks a way to solve it.

I got the answer after many searches. When using code from a link, I use

  e.Location  

with

  PointToClient (cursor.  

So it looks like this.

  Point mouseDownpoint; Private Zero InnerNepinalMouseDown (Object Sender, Mouse EventAgages E) {If (E.Button == MouseBoots.LIFT) This. MouseDownPoint = PointOutContent (Cursor composition); } Private Wide Innerpennel_mousemov (Object Sender, MouseInventErgus E) {PointMaulLock = PointTolic Client (cursor composition); If (E. button! = Mouse button left) return; If returned ((MouseDownPoint.x == MouseOlok.x) & amp; amp; (MouseDownPoint.Y == Mouseok.Y)); Point currAutoS = innerpanel.autoScrollPosition; If (MouseDownPoint.Y & G; Moulok.Y) {// Finger Slide UP (currAutoS.Y! = 0) currAutoS.Y = Math Abs (currAutoS.Y) - 5; } And if (MouseDownPointYyLtMalok.Y) {// finger slide down currAutoS.Y = Math.Abs ​​(currAutoS.Y) + 5; } And (currAutoS.Y = Math.Abs ​​(currAutoS.Y);} If (mouseDownPoint.X> MouseLoc.X) {// Finger slide left if (currAutoS.X! = 0) currAutoS.X = Math.Abs ​​(currAutoS.X) - 5;} and if (mouseDownPoint.x   

Then I have mouse for all things inside the panel Make events to move down and mouse, so that you do not click on any thing, scroll over it and do the same At speed.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -