Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Plz solve mny problem
Message
 
To
09/09/2000 00:09:39
Basharat Ali
Gateway Computers
Sukkur, Pakistan
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00414560
Message ID:
00414591
Views:
24
>is my commands are right but my result is not right
>dir1.path=drive1.drive
>file1.path=dir1.path
>selectedfile=file1.path & "\" & file1.filename
>image1.picture=loadpicture(selectedfile)
>
>
>but the image is not working

This code is working:
Option Explicit

Private Sub Command1_Click()
    Image1.Picture = LoadPicture(File1.Path & "\" & File1.FileName)
End Sub

Private Sub Dir1_Change()
    File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
End Sub
Try it. Be advised that not every image file will be able to be displayed by this control. Help file is saying that (Bitmap, icon, metafile, GIF, JPEG) are working.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform