Mobile Phone slide Unlock code

Source: Internet
Author: User

  #region= = Slide to unlock part = =Private BOOLMouseDown//defines the bool value of the mouse click        Private intCurX;//defines the position x coordinate when the mouse is clicked        Private voidButton11_mousedown (Objectsender, MouseEventArgs e) {MouseDown=true; CurX= cursor.position.x;//get x-coordinate when clicked        }        Private voidButton11_mouseup (Objectsender, MouseEventArgs e)//determine whether the degree of movement meets the requirements{MouseDown=false; if(Cursor.position.x-curx > -) {panel3. Visible=false; }            Else{button11. Location=NewPoint ( A,341); }        }        Private voidButton11_mousemove (Objectsender, MouseEventArgs e) {            if(MouseDown) {button11. Location=NewPoint ( A+cursor.position.x-curx,341); }        }               #endregion        Private voidPanel2_mousedown (Objectsender, MouseEventArgs e) {MouseDown=true; CurX=cursor.position.x; }        Private voidPanel2_mouseup (Objectsender, MouseEventArgs e) {            if(Cursor.position.x-curx <- -) {Panel2. Location=NewPoint (-286,0); Panel4. Location=NewPoint (0,0); }            Else{Panel2. Location=NewPoint (0,0); Panel4. Location=NewPoint (286,0); } MouseDown=false; }        Private voidPanel2_mousemove (Objectsender, MouseEventArgs e) {            if(MouseDown) {Panel2. Location=NewPoint (0+cursor.position.x-curx,0); Panel4. Location=NewPoint (286+ Cursor.position.x-curx,0); }        }        Private voidPanel4_mousedown (Objectsender, MouseEventArgs e) {MouseDown=true; CurX=cursor.position.x; }        Private voidPanel4_mouseup (Objectsender, MouseEventArgs e) {            if(Cursor.position.x-curx > -) {Panel2. Location=NewPoint (0,0); Panel4. Location=NewPoint (289,0); }            Else{Panel2. Location=NewPoint (-286,0); Panel4. Location=NewPoint (0,0); } MouseDown=false; }        Private voidPanel4_mousemove (Objectsender, MouseEventArgs e) {            if(MouseDown) {Panel2. Location=NewPoint (-286+ Cursor.position.x-curx,0); Panel4. Location=NewPoint (0+ Cursor.position.x-curx,0); }        }      

Mobile Phone slide Unlock code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.