VB6 Code Help


Results 1 to 6 of 6

Thread: VB6 Code Help

Threaded View

  1. #5
    mazmoiz's Avatar
    mazmoiz Guest

    Smile X-Y Movement of the arm using mouse !!!

    Hello !!
    May be this piece of code can help u in sending a stream of strings as u want !! (X-Y Movement) and continous streaming !!!

    Send the values of X and Y text boxes to the COM port.
    U have to modify this code as per ur requirements !!

    here the values of textboxes ranges from 0-100 in both the directions
    You have to set the value between 25 to 225 if using Servo motors !!

    the arm movements will follow the mouse movements in x-y position.

    (Note: here code only shows X-Y movements !!! and it doesnt contain
    COM event programming !! You have to use COM control for
    sending textbox values to the port)

    I hope u'll find this code helpful and useful for your project !!
    Regards

    Mazhar Haque


    PLS have a look at the attached ZIP file !!!
    --------------------------------------------------------------------------

    Private Sub Command1_Click()
    xl.Visible = True
    yl.Visible = True
    Picture2.Visible = False

    End Sub


    Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then
    xl.Visible = False
    yl.Visible = False
    Picture2.Visible = True
    End If
    End Sub

    Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim intx As Integer
    Dim inty As Integer

    xl.Y1 = Y
    xl.Y2 = Y
    intx = Abs(Y - 100)
    xt.Text = intx


    yl.X1 = X
    yl.X2 = X
    inty = Abs(X - 100)
    yt.Text = inty

    End Sub
    Attached Files Attached Files

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. VB6 Code Help
    By charudatt in forum Code Examples
    Replies: 5
    Last Post: - 14th July 2006, 20:41

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts