Public Class ProxyForm
  Inherits System.Windows.Forms.Form
  Private imgProxy As ImageProxy

#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
    init()
  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
  Friend WithEvents Pic As System.Windows.Forms.PictureBox
  Friend WithEvents btLoad As System.Windows.Forms.Button

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

  '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.
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.btLoad = New System.Windows.Forms.Button()
    Me.Pic = New System.Windows.Forms.PictureBox()
    Me.SuspendLayout()
    '
    'btLoad
    '
    Me.btLoad.Location = New System.Drawing.Point(112, 240)
    Me.btLoad.Name = "btLoad"
    Me.btLoad.Size = New System.Drawing.Size(56, 24)
    Me.btLoad.TabIndex = 1
    Me.btLoad.Text = "Load"
    '
    'Pic
    '
    Me.Pic.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
    Me.Pic.Location = New System.Drawing.Point(24, 24)
    Me.Pic.Name = "Pic"
    Me.Pic.Size = New System.Drawing.Size(248, 200)
    Me.Pic.TabIndex = 0
    Me.Pic.TabStop = False
    '
    'ProxyForm
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(292, 273)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btLoad, Me.Pic})
    Me.Name = "ProxyForm"
    Me.Text = "Proxy demo"
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private Sub init()
    imgProxy = New ImageProxy()
  End Sub

  Private Sub btLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btLoad.Click
    Pic.Image = imgProxy.getImage
  End Sub
End Class
