Imports System.Windows.Forms

Public Class PictureZoomer

    Private Sub PictureZoomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Enabled = True
        Me.Size = New Size(picZoom.Width, picZoom.Height)
    End Sub

    Private Sub picZoom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picZoom.Click
        Dim sfd As New SaveFileDialog
        With sfd
            .Title = "Save Iamge File"
            .DefaultExt = ".jpg"
            .InitialDirectory = My.Computer.FileSystem.SpecialDirectories.Desktop
            .Filter = "JPEG Files|*.jpg|Bitmap Files|*.bmp|TIFF Files|*.tiff"
            Try
                If .ShowDialog = Windows.Forms.DialogResult.OK Then
                    Me.picZoom.Image.Save(.FileName, Imaging.ImageFormat.Jpeg)
                End If
            Catch ex As Exception
                MsgBox(ex.Message)
            Finally
                Me.Close()
            End Try
        End With
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Me.Opacity = 60 / 100 * Rnd()
    End Sub
End Class
