WORKING WITH MULTIPLE FORMS
Dim f, s1 As String
File:
Private Sub Command1_Click()
fn = File1.FileName
s1 = Right(fn, 4)
If s1 = ".jpg" Or s1 = ".gif" Or s1 = ".JPG" Or s1 = ".GIF" Or s1 = ".bmp" Then
Load Form2
Form2.Show
Form2.Image1.Picture = LoadPicture(Form1.File1.Path & "\" & Form1.File1.FileName)
Else
Load Form5
Form5.Show
Form5.OLE1.CreateLink (Form1.File1.Path & "\" & Form1.File1.FileName)
End If
End Sub
Clear:
Private Sub Command2_Click()
Drive1.ListIndex = -1
Dir1.ListIndex = -1
File1.ListIndex = -1
End Sub
Exit:
Private Sub Command3_Click()
End
End Sub
Directory:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Drive:
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
OUTPUT:
0 comments
Post a Comment