Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
On Error GoTo errore
Dir1.Path = Left$(Drive1.Drive, 1) & ":\"
Exit Sub
errore:
MsgBox Err.Description, vbExclamation + vbOKOnly, "ERRORE"
End Sub
Private Sub File1_Click()
Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)
frmMain.Caption = File1.FileName & " - OAI"
End Sub
Private Sub Form_DblClick()
Dim iAnswer As Integer
iAnswer = MsgBox("Sei sicuro di voler terminare il programma?", vbInformation + vbYesNo, "CONFERMA")
If iAnswer = vbYes Then
End
Else
frmMain.Show
End If
End Sub
Private Sub Form_Load()
Dir1.Path = "c:\windows"
File1.Pattern = "*.bmp;*.dib;*.wmf;*.emf;*.gif;*.jpg"
End Sub
Private Sub Form_Resize()
On Error Resume Next
Image1.Move Image1.Left, Image1.Top, ScaleWidth - Image1.Left, ScaleHeight - Image1.Top
picContenitore.Height = Image1.Height
MostraImmagine
End Sub
Sub MostraImmagine()
' visualizza l'immagine
Dim x As Single, y As Single
If chkStretch.Value = vbChecked Then
Image1.PaintPicture Image1.Picture, 0, 0, Image1.ScaleWidth, Image1.ScaleHeight
End If
End Sub
Private Sub Image1_DblClick()
Dim iAnswer As Integer
iAnswer = MsgBox("Sei sicuro di voler terminare il programma?", vbInformation + vbYesNo, "CONFERMA")
If iAnswer = vbYes Then
End
Else
frmMain.Show
End If
End Sub