RP Store Tìm linh kiện theo mã, gửi BOM nhận báo giá Gửi BOM

giúp em về ngôn Visua Basic với các Anh,Chị ơi !!!

Collapse
X
 
  • Giờ
  • Show
Clear All
new posts
  • loveofteens8x
    Nhập môn đệ tử
    • Dec 2010
    • 5

    #1

    giúp em về ngôn Visua Basic với các Anh,Chị ơi !!!

    Có 1 đoạn code Visua Bassic ( vesion 6.0 ) như thế này, nhưng chỉ có vài câu lệnh là được giải thích ý nghĩa. Có Anh, Chị nào hiểu về ngôn ngữ này làm ơn giải thích giùm em ý nghĩa từng lệnh được không ạ, còn vài lệnh đã được giải thích rồi nều không hợp lý thì mong Anh, Chị bổ sung thêm luôn.. em thanks Anh, Chị nào giúp đỡ nhiều lắm !!!

    Private Sub Command3_Click()
    MSComm1.CommPort = Text1.Text ‘ so thu tu cong truyen thong
    If MSComm1.PortOpen = True Then
    MSComm1.PortOpen = False ‘ xac nhan mo cong
    Else
    MSComm1.Settings = " 2400 , n , 8 , 1" ‘xac dinh cac tham so truyen
    MSComm1.RThreshold = 1
    MSComm1.PortOpen = True
    End If
    Command3.Visible = False ‘an chu command3
    Timer2.Enabled = True
    End Sub

    Private Sub Command4_Click()
    If Text4.Text > 0 Then
    Text4.Text = Text4.Text - 1
    End If
    End Sub

    Private Sub Command5_Click()
    If Text4.Text < 50 Then
    Text4.Text = Text4.Text + 1
    End If
    End Sub

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyLeft 'Xu ly nut di chuyen trai tren ban phim
    Label3.Caption = "Down"
    If Text2.Text > 0 Then
    Text2.Text = Text2.Text - 1
    End If
    Case vbKeyRight 'Xu ly nut di chuyen phai tren ban phim
    Label3.Caption = "Up"
    If Text2.Text < 9 Then
    Text2.Text = Text2.Text + 1
    End If
    Case vbKeyUp 'Xu ly nut di chuyen tren tren ban phim
    Label5.Caption = "Next"
    If Text4.Text < 5 Then
    Text4.Text = Text4.Text + 1
    End If

    Case vbKeyDown 'Xu ly nut di chuyen duoi tren ban phim
    Label5.Caption = "Back"
    If Text4.Text > 0 Then
    Text4.Text = Text4.Text - 1
    End If

    Case vbKeyShift 'Xu ly nut shift tren ban phim
    Label2.Caption = "Xoay"
    Text5.Text = "1"
    Case vbKeyControl 'Xu ly nut control tren ban phim
    Label2.Caption = "Can bang"
    Text5.Text = "0"
    End Select
    End Sub




    Private Sub Timer1_Timer()
    Text3.Text = 9 - Text2.Text

    End Sub

    Private Sub Timer2_Timer()
    MSComm1.Output = "s" + Text3.Text ‘ ham xuat ki tu ra cong noi tiep
    MSComm1.Output = "t" + Text4.Text
    MSComm1.Output = "x" + Text5.Text

    End Sub
    Attached Files
Working...