Doc hinh van ban

Private Sub Combo1_Click()

File1.FileName = Combo1.Text

End Sub

Private Sub Command1_Click()

Dim s As String

s = File1.Path & "\" & File1.FileName

If LCase(Right(s, 3)) = "jpg" Then

    Image1.Picture = LoadPicture(s)

    Else

If LCase(Right(s, 3)) = "exe" Then

 Shell (File1.Path & "\" & File1.FileName)

End If

End If

End Sub

Private Sub Command2_Click()

If MsgBox("Ban co muon thoat khong?", vbQuestion + vbYesNo, "Thong bao") = vbYes Then

    End

Else

    End If

End Sub

Private Sub Dir1_Change()

File1.Path = Dir1.Path

Text1.Text = File1.Path & "\" & File1.FileName

Command1.Enabled = False

End Sub

Private Sub Drive1_Change()

Dir1.Path = Drive1.Drive

Text1.Text = File1.Path & "\" & File1.FileName

End Sub

Private Sub File1_Click()

Text1.Text = File1.Path & "\" & File1.FileName

Command1.Enabled = True

End Sub

Private Sub Form_Load()

Combo1.AddItem "*.txt"

Combo1.AddItem "*.jpg"

Combo1.AddItem "*.bmp"

Combo1.AddItem "*.exe"

Combo1.AddItem "*.*"

Combo1.Text = "*.*"

Text1.Text = File1.Path & "\" & File1.FileName

Command1.Enabled = False

End Sub

Bạn đang đọc truyện trên: AzTruyen.Top

Tags: