Pages

Monday, 26 March 2012

WORKING WITH MULTIPLE FORMS


WORKING WITH MULTIPLE FORMS


requirments
label box, already using command buttons,text boxs, 
drive box, directory box,list box
and 3 forms order by order 

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

would u like this?

Chitika