Vb yardım

yesevi31

New member
Katılım
14 Ara 2007
Mesajlar
5
Reaction score
0
Puanları
0
Arkadaşlar vb ile bi ödev yapmaya karar verdim çarşamba son gün teslim etmem lazım çok zor birşey değil zaten vb den de çok anlamam tek sorunum şu bi buton var mesela butona tıklayınca C: deki bi resmi açtırmak istiyorum . Kodunu söyleyebilirmisiniz.Shelli bi komut buldum ama .exe dosyalarını açtırabiliyorum sadece lütfen yardım edin.
 
1 adet picturebox
1 adet dirlistbox
1 adet filelistbox

Private Sub Form_Load()
File1.Pattern = "*.BMP;*.ICO;*.WMF;*.DIB;*.JPG;*.GIF"
Picture1.AutoSize = True
End Sub

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

Private Sub Drive1_Change()
ChDrive Drive1.Drive
Dir1.Path = Drive1.Path
End Sub

Private Sub File1_Click()
On Local Error GoTo r
Picture1.Picture = LoadPicture(File1.FileName)
Exit Sub
r:
MsgBox ("resim hatası")
Exit Sub
End Sub


komut düğmesiyle kullanmak istiyorsan bir komut düğmesi ekle ve file1_click() kodunu komut düğmesinin click olayına ekle.
 
1 adet picturebox
1 adet dirlistbox
1 adet filelistbox

Private Sub Form_Load()
File1.Pattern = "*.BMP;*.ICO;*.WMF;*.DIB;*.JPG;*.GIF"
Picture1.AutoSize = True
End Sub

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

Private Sub Drive1_Change()
ChDrive Drive1.Drive
Dir1.Path = Drive1.Path
End Sub

Private Sub File1_Click()
On Local Error GoTo r
Picture1.Picture = LoadPicture(File1.FileName)
Exit Sub
r:
MsgBox ("resim hatası")
Exit Sub
End Sub


komut düğmesiyle kullanmak istiyorsan bir komut düğmesi ekle ve file1_click() kodunu komut düğmesinin click olayına ekle.




harika olmuş ellerine saglık
 
Geri
Üst