Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] Graphics Viewer [SRC] [Simple]
#1
Design
Code:
Inherits System.Windows.Forms.Form

Code:
#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents btnSelectPicture As System.Windows.Forms.Button
    Friend WithEvents btnQuit As System.Windows.Forms.Button
    Friend WithEvents PicShowPicture As System.Windows.Forms.PictureBox
    Friend WithEvents ofdSelectPicture As System.Windows.Forms.OpenFileDialog
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.btnSelectPicture = New System.Windows.Forms.Button()
        Me.btnQuit = New System.Windows.Forms.Button()
        Me.PicShowPicture = New System.Windows.Forms.PictureBox()
        Me.ofdSelectPicture = New System.Windows.Forms.OpenFileDialog()
        Me.SuspendLayout()
        '
        'btnSelectPicture
        '
        Me.btnSelectPicture.Location = New System.Drawing.Point(24, 296)
        Me.btnSelectPicture.Name = "btnSelectPicture"
        Me.btnSelectPicture.Size = New System.Drawing.Size(90, 25)
        Me.btnSelectPicture.TabIndex = 0
        Me.btnSelectPicture.Text = "Select Picture"
        '
        'btnQuit
        '
        Me.btnQuit.Location = New System.Drawing.Point(160, 296)
        Me.btnQuit.Name = "btnQuit"
        Me.btnQuit.Size = New System.Drawing.Size(90, 25)
        Me.btnQuit.TabIndex = 1
        Me.btnQuit.Text = "Quit"
        '
        'PicShowPicture
        '
        Me.PicShowPicture.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.PicShowPicture.Location = New System.Drawing.Point(8, 8)
        Me.PicShowPicture.Name = "PicShowPicture"
        Me.PicShowPicture.Size = New System.Drawing.Size(282, 275)
        Me.PicShowPicture.TabIndex = 2
        Me.PicShowPicture.TabStop = False
        '
        'ofdSelectPicture
        '
        Me.ofdSelectPicture.Filter = "Windows Bitmaps|*.BMP| JPEG Files|*.JPG"
        Me.ofdSelectPicture.Title = "Select Picture"
        '
        'frmViewer
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(320, 341)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.PicShowPicture, Me.btnQuit, Me.btnSelectPicture})
        Me.Name = "frmViewer"
        Me.Text = "Picture Viewer"
        Me.ResumeLayout(False)

    End Sub

#End Region

Project Source
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Show the Open File Dialog Box
        If ofdSelectPicture.ShowDialog = DialogResult.OK Then
            'Load the Picture into picture Box.
            PicShowPicture.Image = Image.FromFile(ofdSelectPicture.FileName)
            ' Show the name of the file in the Form Caption.
            Me.Text = "Picture Viewer(" & ofdSelectPicture.FileName & ")"
    End Sub
[Image: 0b0033.gif]
Reply


Messages In This Thread
[VB.NET] Graphics Viewer [SRC] [Simple] - by ★ASI_F★™ - 07-08-2011, 07:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOURCE] Advanced Webcam Viewer TalishHF 4 3,847 08-25-2014, 01:20 AM
Last Post: dark_move
  [VB.NET] Animated Form Extend [SRC] Fragma 6 5,550 10-10-2013, 12:18 PM
Last Post: Saket
  [VB.NET] Remote desktop viewer [VB.NET] TalishHF 13 11,570 05-25-2013, 03:21 AM
Last Post: Imaking31
  [VB.Net][SRC] YouTube Bot HF~Legend 5 3,667 11-25-2012, 05:54 AM
Last Post: Ixam
  [VB.Net] Simple captcha class [Commented][Noob/Friendly] The-One 18 9,472 09-08-2012, 04:20 PM
Last Post: spesificrelax

Forum Jump:


Users browsing this thread: 1 Guest(s)