nhahang ban me
Dim x, dx As Long
Private Sub cmd1to2_Click()
If List1.ListIndex >= 0 Then
List2.AddItem List1.List(List1.ListIndex)
List1.RemoveItem (List1.ListIndex)
End If
End Sub
Private Sub cmd2to1_Click()
If List2.ListIndex >= 0 Then
List1.AddItem List2.List(List2.ListIndex)
List2.RemoveItem (List2.ListIndex)
End If
End Sub
Private Sub cmdall1_Click()
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i)
Next i
List1.Clear
End Sub
Private Sub cmdall2_Click()
For i = 0 To List2.ListCount - 1
List1.AddItem List2.List(i)
Next i
List2.Clear
End Sub
Private Sub cmdbs_Click()
List1.AddItem txtbs.Text
txtbs = ""
End Sub
Private Sub cmdlb_Click()
List2.RemoveItem (List2.ListIndex)
End Sub
Private Sub cmdthoat_Click()
Dim x As String
x = MsgBox("Ban muon thoat?", vbOKCancel + vbQuestion + vbDefaultButton1, "Thong bao!")
If x = vbOK Then
End
End If
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
x = 100
dx = 50
End Sub
Private Sub List1_DblClick()
cmd1to2_Click
End Sub
Private Sub List2_Click()
cmdlb.Enabled = True
End Sub
Private Sub List2_DblClick()
cmd2to1_Click
End Sub
Private Sub Timer1_Timer()
lblhead.Move x
If (x + lblhead.Width >= Width) Or (x <= 0) Then
dx = -dx
End If
x = x + dx
lblhead.ForeColor = vbRed
End Sub
Private Sub Timer2_Timer()
frmthucdon.Caption = "nha hang ban me"
frmthucdon.BackColor = vbGreen
End Sub
Private Sub txtbs_Click()
cmdbs.Enabled = True
End Sub
Bạn đang đọc truyện trên: AzTruyen.Top