WELLCOME

Visual Basic is a very easy and powerful programming language, a very simple coding of the software can be created with Visual Basic. I have my Blogger (http://www.vbcodebd.blogspot.com) in Visual basic 6.0 via kinds Program will discuss the code. Thanks All ..........

Thursday, February 14, 2013

Mause Move Draw line Program code vb 6 (Visual Basic Tutorial - 15)



Create a form.

Add the following code to the form code module for the Formr1 _Click event:


Program code:

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Form1.CurrentX = X
    Form1.CurrentY = Y
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
     Line (Form1.CurrentX, Form1.CurrentY)-(X, Y), QBColor(4)
    End If
End Sub
 ...........................................................................................
by Md. Sayemon
...........................................................................................

No comments:

Post a Comment