Beeldviewer: code


Private Sub Form_Load()
'een functietoets faken
mnuFileClose.Caption = mnuFileClose.Caption & Chr(9) & "Alt+F4"
End Sub

Private Sub Form_Resize()
Picture1.Top = 0
Picture1.Left = 0
If Me.WindowState = vbMinimized Then Exit Sub
Picture1.Width = Me.Width - 200
Picture1.Height = Me.Height - 800
End Sub

Private Sub mnuFileClose_Click()
Unload Me
End Sub

Private Sub mnuFileNew_Click()
Dim f As New Form1
f.Show
End Sub

Private Sub mnuFileOpen_Click()
On Error GoTo foutafhandeling
CommonDialog1.Filter = "GIF bestanden|*.gif|JPG bestanden|*.jp*|Bitmap bestanden|*.bmp|Alle bestanden|*.*"
CommonDialog1.ShowOpen
Picture1.Picture = LoadPicture(CommonDialog1.FileName)
Exit Sub
foutafhandeling:
Select Case MsgBox(Err.message, vbAbortRetryIgnore)
Case vbAbort
Resume 0
Case vbRetry
Resume
Case vbIgnore
Resume Next
End Select
End Sub


[Beeldviewer] - [VB Web] - [hlrnet] - [copyright]