Public Class Form1
    Inherits System.Windows.Forms.Form

#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 AMC As AxAXISMEDIACONTROLLib.AxAxisMediaControl
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
    Me.AMC = New AxAXISMEDIACONTROLLib.AxAxisMediaControl()
    CType(Me.AMC, System.ComponentModel.ISupportInitialize).BeginInit()
    Me.SuspendLayout()
    '
    'AMC
    '
    Me.AMC.Enabled = True
    Me.AMC.Location = New System.Drawing.Point(8, 8)
    Me.AMC.Name = "AMC"
    Me.AMC.OcxState = CType(resources.GetObject("AMC.OcxState"), System.Windows.Forms.AxHost.State)
    Me.AMC.Size = New System.Drawing.Size(552, 424)
    Me.AMC.TabIndex = 0
    '
    'Form1
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(568, 445)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.AMC})
    Me.Name = "Form1"
    Me.Text = "PTZ Sample"
    CType(Me.AMC, System.ComponentModel.ISupportInitialize).EndInit()
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    ' Set the PTZ properties
    AMC.PTZControlURL = "http://10.13.9.124/axis-cgi/com/ptz.cgi"
    AMC.UIMode = "ptz-absolute"

    ' Show the status bar and the tool bar in the AXIS Media Control
    AMC.ShowStatusBar = True
    AMC.ShowToolbar = True
    AMC.StretchToFit = True

    ' Set the media URL and the media type
    AMC.MediaURL = "http://10.13.9.124/axis-cgi/mjpg/video.cgi"
    AMC.MediaType = "mjpeg-unicast"

    AMC.Play()

  End Sub

End Class
