<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FPictureBox</id>
		<title>VB.Net/GUI/PictureBox - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FPictureBox"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/PictureBox&amp;action=history"/>
		<updated>2026-04-05T06:16:10Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/PictureBox&amp;diff=454&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/PictureBox&amp;diff=454&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/PictureBox&amp;diff=455&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/PictureBox&amp;diff=455&amp;oldid=prev"/>
				<updated>2010-05-26T12:43:09Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Create Graphics from Bitmap and paint on a Picture Box==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Math&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
       Dim form1 As Form = New Form1()&lt;br /&gt;
       Application.Run(form1)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) _&lt;br /&gt;
     Handles MyBase.Load&lt;br /&gt;
        DrawDiamond()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) _&lt;br /&gt;
     Handles MyBase.Resize&lt;br /&gt;
        DrawDiamond()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub DrawDiamond()&lt;br /&gt;
        Dim wid As Integer = picCanvas.ClientSize.Width&lt;br /&gt;
        Dim hgt As Integer = picCanvas.ClientSize.Height&lt;br /&gt;
        &amp;quot; Do nothing if we have no size.&lt;br /&gt;
        &amp;quot; This happens, for example, if the form is minimized.&lt;br /&gt;
        If wid &amp;lt; 1 Or hgt &amp;lt; 1 Then Exit Sub&lt;br /&gt;
        &amp;quot; Make a Bitmap and Graphics to fit.&lt;br /&gt;
        Dim bm As New Bitmap(wid, hgt)&lt;br /&gt;
        Dim gr As Graphics = Graphics.FromImage(bm)&lt;br /&gt;
        Dim bg_brush As New HatchBrush(HatchStyle.HorizontalBrick, _&lt;br /&gt;
            Color.Blue, Color.Aqua)&lt;br /&gt;
        gr.FillRectangle(bg_brush, picCanvas.ClientRectangle)&lt;br /&gt;
        &amp;quot; Display the result.&lt;br /&gt;
        picCanvas.Image = bm&lt;br /&gt;
        &amp;quot; Free resources.&lt;br /&gt;
        bg_brush.Dispose()&lt;br /&gt;
        gr.Dispose()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.picCanvas = New System.Windows.Forms.PictureBox&lt;br /&gt;
        CType(Me.picCanvas, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picCanvas&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picCanvas.Dock = System.Windows.Forms.DockStyle.Fill&lt;br /&gt;
        Me.picCanvas.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picCanvas.Name = &amp;quot;picCanvas&amp;quot;&lt;br /&gt;
        Me.picCanvas.Size = New System.Drawing.Size(292, 273)&lt;br /&gt;
        Me.picCanvas.TabIndex = 0&lt;br /&gt;
        Me.picCanvas.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
        Me.Controls.Add(Me.picCanvas)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;AutoRedraw&amp;quot;&lt;br /&gt;
        CType(Me.picCanvas, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents picCanvas As System.Windows.Forms.PictureBox&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Display BMP, Ppeg and Gif Image in PictureBox==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.IO&lt;br /&gt;
&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents Button1 As System.Windows.Forms.Button&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.PictureBox1 = New System.Windows.Forms.PictureBox()&lt;br /&gt;
        Me.Button1 = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;PictureBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.PictureBox1.Location = New System.Drawing.Point(32, 24)&lt;br /&gt;
        Me.PictureBox1.Name = &amp;quot;PictureBox1&amp;quot;&lt;br /&gt;
        Me.PictureBox1.Size = New System.Drawing.Size(224, 216)&lt;br /&gt;
        Me.PictureBox1.TabIndex = 0&lt;br /&gt;
        Me.PictureBox1.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Button1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Button1.Location = New System.Drawing.Point(104, 264)&lt;br /&gt;
        Me.Button1.Name = &amp;quot;Button1&amp;quot;&lt;br /&gt;
        Me.Button1.Size = New System.Drawing.Size(80, 23)&lt;br /&gt;
        Me.Button1.TabIndex = 1&lt;br /&gt;
        Me.Button1.Text = &amp;quot;Start&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 309)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.PictureBox1})&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;MyPhotos&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Public ImageFiles() As String&lt;br /&gt;
    Public FileIndex As Integer&lt;br /&gt;
    Public Sub ShowImages()&lt;br /&gt;
        Dim FileDB As New OpenFileDialog()&lt;br /&gt;
        FileDB.Multiselect = True&lt;br /&gt;
        If (FileDB.ShowDialog() = DialogResult.OK) Then&lt;br /&gt;
            ImageFiles = FileDB.FileNames&lt;br /&gt;
            Me.Refresh()&lt;br /&gt;
            If ImageFiles.Length = 0 Then&lt;br /&gt;
                MsgBox(&amp;quot;No files selected&amp;quot;)&lt;br /&gt;
                Me.Close()&lt;br /&gt;
            Else&lt;br /&gt;
                Dim IsImageFile As Boolean&lt;br /&gt;
                Button1.Text = &amp;quot;End&amp;quot;&lt;br /&gt;
                Dim MyImage As Image&lt;br /&gt;
                FileIndex = 0&lt;br /&gt;
                Do&lt;br /&gt;
                    IsImageFile = False&lt;br /&gt;
                    If (UCase(ImageFiles(FileIndex)).EndsWith(&amp;quot;JPG&amp;quot;)) Then&lt;br /&gt;
                        IsImageFile = True&lt;br /&gt;
                    End If&lt;br /&gt;
                    If (UCase(ImageFiles(FileIndex)).EndsWith(&amp;quot;BMP&amp;quot;)) Then&lt;br /&gt;
                        IsImageFile = True&lt;br /&gt;
                    End If&lt;br /&gt;
                    If (UCase(ImageFiles(FileIndex)).EndsWith(&amp;quot;GIF&amp;quot;)) Then&lt;br /&gt;
                        IsImageFile = True&lt;br /&gt;
                    End If&lt;br /&gt;
                    If (IsImageFile) Then&lt;br /&gt;
                        Me.Text = ImageFiles(FileIndex)&lt;br /&gt;
                        Try&lt;br /&gt;
                            MyImage = Image.FromFile(ImageFiles(FileIndex))&lt;br /&gt;
                            PictureBox1.Image = Image.FromFile(ImageFiles(FileIndex))&lt;br /&gt;
                            Display.Sleep(5000)&lt;br /&gt;
                        Catch Ex As Exception&lt;br /&gt;
                        End Try&lt;br /&gt;
                    End If&lt;br /&gt;
                    FileIndex = FileIndex + 1&lt;br /&gt;
                    If (FileIndex = ImageFiles.Length) Then&lt;br /&gt;
                        FileIndex = 0&lt;br /&gt;
                    End If&lt;br /&gt;
                Loop While (True)&lt;br /&gt;
            End If&lt;br /&gt;
        Else&lt;br /&gt;
            MsgBox(&amp;quot;User selected Cancel&amp;quot;)&lt;br /&gt;
            Me.Close()&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
    Dim Display As System.Threading.Thread&lt;br /&gt;
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;
        Dim FileDB As New OpenFileDialog()&lt;br /&gt;
        FileDB.Multiselect = True&lt;br /&gt;
        If (Button1.Text = &amp;quot;End&amp;quot;) Then&lt;br /&gt;
            Display.Abort()&lt;br /&gt;
            Me.Close()&lt;br /&gt;
        Else&lt;br /&gt;
            Button1.Text = &amp;quot;End&amp;quot;&lt;br /&gt;
            Display = New System.Threading.Thread(AddressOf ShowImages)&lt;br /&gt;
            Display.Start()&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Load Image into PictureBox==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Collections&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.IO&lt;br /&gt;
Imports System.Xml.Serialization&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Printing&lt;br /&gt;
&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
       Dim form1 As Form = New Form1()&lt;br /&gt;
       Application.Run(form1) &lt;br /&gt;
     End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.Container&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))&lt;br /&gt;
        Me.PictureBox1 = New System.Windows.Forms.PictureBox()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;PictureBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.PictureBox1.Location = New System.Drawing.Point(16, 8)&lt;br /&gt;
        Me.PictureBox1.Name = &amp;quot;PictureBox1&amp;quot;&lt;br /&gt;
        Me.PictureBox1.Size = New System.Drawing.Size(264, 200)&lt;br /&gt;
        Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage&lt;br /&gt;
        Me.PictureBox1.TabIndex = 1&lt;br /&gt;
        Me.PictureBox1.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 268)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.PictureBox1})&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;PictureBox demo&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Me.PictureBox1.Image = New System.Drawing.Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paint on a PictureBox==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Printing&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    &lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
       Dim form1 As Form = New Form1&lt;br /&gt;
       Application.Run(form1)    &lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub picCanvas3_Paint(ByVal sender As Object, _&lt;br /&gt;
     ByVal e As System.Windows.Forms.PaintEventArgs) Handles picCanvas3.Paint&lt;br /&gt;
        e.Graphics.DrawEllipse(Pens.Red, _&lt;br /&gt;
            picCanvas3.DisplayRectangle.X, _&lt;br /&gt;
            picCanvas3.DisplayRectangle.Y, _&lt;br /&gt;
            picCanvas3.DisplayRectangle.Width - 1, _&lt;br /&gt;
            picCanvas3.DisplayRectangle.Height - 1)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.picCanvas3 = New System.Windows.Forms.PictureBox&lt;br /&gt;
        CType(Me.picCanvas3, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picCanvas3&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picCanvas3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D&lt;br /&gt;
        Me.picCanvas3.Location = New System.Drawing.Point(360, 8)&lt;br /&gt;
        Me.picCanvas3.Name = &amp;quot;picCanvas3&amp;quot;&lt;br /&gt;
        Me.picCanvas3.Size = New System.Drawing.Size(168, 168)&lt;br /&gt;
        Me.picCanvas3.TabIndex = 3&lt;br /&gt;
        Me.picCanvas3.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(536, 214)&lt;br /&gt;
        Me.Controls.Add(Me.picCanvas3)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;UsePictureBox&amp;quot;&lt;br /&gt;
        CType(Me.picCanvas3, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents picCanvas3 As System.Windows.Forms.PictureBox&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using a PictureBox to display images==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
        Dim myform As Form = New FrmPictureBox()&lt;br /&gt;
        Application.Run(myform)&lt;br /&gt;
   End Sub &amp;quot; Main&lt;br /&gt;
End Class&lt;br /&gt;
Public Class FrmPictureBox&lt;br /&gt;
   Inherits System.Windows.Forms.Form&lt;br /&gt;
   Private imageNumber As Integer = -1&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
   Public Sub New()&lt;br /&gt;
      MyBase.New()&lt;br /&gt;
      &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
      InitializeComponent()&lt;br /&gt;
      &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
   End Sub&lt;br /&gt;
   &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
   Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
      If disposing Then&lt;br /&gt;
         If Not (components Is Nothing) Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
         End If&lt;br /&gt;
      End If&lt;br /&gt;
      MyBase.Dispose(disposing)&lt;br /&gt;
   End Sub&lt;br /&gt;
   Friend WithEvents picImage As System.Windows.Forms.Label&lt;br /&gt;
   Friend WithEvents lblPrompt As System.Windows.Forms.Label&lt;br /&gt;
   &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
   Private components As System.ruponentModel.Container&lt;br /&gt;
   &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
   &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
   &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
   &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
      Me.picImage = New System.Windows.Forms.Label()&lt;br /&gt;
      Me.lblPrompt = New System.Windows.Forms.Label()&lt;br /&gt;
      Me.SuspendLayout()&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;picImage&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.picImage.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D&lt;br /&gt;
      Me.picImage.Location = New System.Drawing.Point(16, 48)&lt;br /&gt;
      Me.picImage.Name = &amp;quot;picImage&amp;quot;&lt;br /&gt;
      Me.picImage.Size = New System.Drawing.Size(264, 208)&lt;br /&gt;
      Me.picImage.TabIndex = 1&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;lblPrompt&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.lblPrompt.Location = New System.Drawing.Point(16, 16)&lt;br /&gt;
      Me.lblPrompt.Name = &amp;quot;lblPrompt&amp;quot;&lt;br /&gt;
      Me.lblPrompt.Size = New System.Drawing.Size(264, 23)&lt;br /&gt;
      Me.lblPrompt.TabIndex = 0&lt;br /&gt;
      Me.lblPrompt.Text = &amp;quot;Click On PictureBox to View Images&amp;quot;&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;FrmPictureBox&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
      Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.picImage, Me.lblPrompt})&lt;br /&gt;
      Me.Name = &amp;quot;FrmPictureBox&amp;quot;&lt;br /&gt;
      Me.Text = &amp;quot;PictureBoxTest&amp;quot;&lt;br /&gt;
      Me.ResumeLayout(False)&lt;br /&gt;
   End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
   &amp;quot; replace image in picImage&lt;br /&gt;
   Private Sub picImage_Click(ByVal sender As System.Object, _&lt;br /&gt;
      ByVal e As System.EventArgs) Handles picImage.Click&lt;br /&gt;
      &amp;quot; create Image object from file, display in PictureBox&lt;br /&gt;
      picImage.Image = Image.FromFile(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>