Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Plz solve mny problem
Message
 
À
09/09/2000 00:09:39
Basharat Ali
Gateway Computers
Sukkur, Pakistan
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00414560
Message ID:
00414591
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform