Click here to Skip to main content
15,895,799 members
Articles / Programming Languages / Visual Basic

Play your AVI files with this DirectX video player

Rate me:
Please Sign up or sign in to vote.
4.83/5 (12 votes)
24 Apr 2013CPOL4 min read 130.8K   8.1K   60  
Plays AVI files using Microsoft's DirectX.AudioVideoPlayback.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ScreenSaverTest
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    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.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.buttonRestore = New System.Windows.Forms.Button
        Me.buttonRefresh = New System.Windows.Forms.Button
        Me.entryScreensaverTimeout = New System.Windows.Forms.NumericUpDown
        Me.buttonUpdateTimeout = New System.Windows.Forms.Button
        Me.valueScreensaverTimeout = New System.Windows.Forms.Label
        Me.labelScreensaverTimeout = New System.Windows.Forms.Label
        Me.buttonActivate = New System.Windows.Forms.Button
        Me.valueScreenSaverActive = New System.Windows.Forms.Label
        Me.labelScreenSaverActive = New System.Windows.Forms.Label
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.valueKillState = New System.Windows.Forms.Label
        Me.buttonStartStopTimer = New System.Windows.Forms.Button
        Me.labelSeconds = New System.Windows.Forms.Label
        Me.entryKillPeriod = New System.Windows.Forms.NumericUpDown
        Me.labelPeriod = New System.Windows.Forms.Label
        Me.buttonClose = New System.Windows.Forms.Button
        Me.GroupBox1.SuspendLayout()
        CType(Me.entryScreensaverTimeout, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox2.SuspendLayout()
        CType(Me.entryKillPeriod, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.buttonRestore)
        Me.GroupBox1.Controls.Add(Me.buttonRefresh)
        Me.GroupBox1.Controls.Add(Me.entryScreensaverTimeout)
        Me.GroupBox1.Controls.Add(Me.buttonUpdateTimeout)
        Me.GroupBox1.Controls.Add(Me.valueScreensaverTimeout)
        Me.GroupBox1.Controls.Add(Me.labelScreensaverTimeout)
        Me.GroupBox1.Controls.Add(Me.buttonActivate)
        Me.GroupBox1.Controls.Add(Me.valueScreenSaverActive)
        Me.GroupBox1.Controls.Add(Me.labelScreenSaverActive)
        Me.GroupBox1.ForeColor = System.Drawing.Color.Lime
        Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(344, 127)
        Me.GroupBox1.TabIndex = 0
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Settings"
        '
        'buttonRestore
        '
        Me.buttonRestore.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.buttonRestore.Location = New System.Drawing.Point(193, 92)
        Me.buttonRestore.Name = "buttonRestore"
        Me.buttonRestore.Size = New System.Drawing.Size(66, 23)
        Me.buttonRestore.TabIndex = 8
        Me.buttonRestore.Text = "Restore"
        Me.buttonRestore.UseVisualStyleBackColor = True
        '
        'buttonRefresh
        '
        Me.buttonRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.buttonRefresh.Location = New System.Drawing.Point(31, 92)
        Me.buttonRefresh.Name = "buttonRefresh"
        Me.buttonRefresh.Size = New System.Drawing.Size(66, 23)
        Me.buttonRefresh.TabIndex = 7
        Me.buttonRefresh.Text = "Refresh"
        Me.buttonRefresh.UseVisualStyleBackColor = True
        '
        'entryScreensaverTimeout
        '
        Me.entryScreensaverTimeout.Location = New System.Drawing.Point(275, 58)
        Me.entryScreensaverTimeout.Maximum = New Decimal(New Integer() {9999, 0, 0, 0})
        Me.entryScreensaverTimeout.Name = "entryScreensaverTimeout"
        Me.entryScreensaverTimeout.Size = New System.Drawing.Size(57, 20)
        Me.entryScreensaverTimeout.TabIndex = 6
        Me.entryScreensaverTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.entryScreensaverTimeout.Value = New Decimal(New Integer() {5, 0, 0, 0})
        '
        'buttonUpdateTimeout
        '
        Me.buttonUpdateTimeout.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.buttonUpdateTimeout.Location = New System.Drawing.Point(193, 55)
        Me.buttonUpdateTimeout.Name = "buttonUpdateTimeout"
        Me.buttonUpdateTimeout.Size = New System.Drawing.Size(66, 23)
        Me.buttonUpdateTimeout.TabIndex = 5
        Me.buttonUpdateTimeout.Text = "<<Write"
        Me.buttonUpdateTimeout.UseVisualStyleBackColor = True
        '
        'valueScreensaverTimeout
        '
        Me.valueScreensaverTimeout.AutoSize = True
        Me.valueScreensaverTimeout.Location = New System.Drawing.Point(142, 60)
        Me.valueScreensaverTimeout.Name = "valueScreensaverTimeout"
        Me.valueScreensaverTimeout.Size = New System.Drawing.Size(35, 13)
        Me.valueScreensaverTimeout.TabIndex = 4
        Me.valueScreensaverTimeout.Text = "<null>"
        '
        'labelScreensaverTimeout
        '
        Me.labelScreensaverTimeout.AutoSize = True
        Me.labelScreensaverTimeout.Location = New System.Drawing.Point(20, 60)
        Me.labelScreensaverTimeout.Name = "labelScreensaverTimeout"
        Me.labelScreensaverTimeout.Size = New System.Drawing.Size(116, 13)
        Me.labelScreensaverTimeout.TabIndex = 3
        Me.labelScreensaverTimeout.Text = "ScreenSaver Timeout :"
        '
        'buttonActivate
        '
        Me.buttonActivate.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.buttonActivate.Location = New System.Drawing.Point(193, 12)
        Me.buttonActivate.Name = "buttonActivate"
        Me.buttonActivate.Size = New System.Drawing.Size(66, 25)
        Me.buttonActivate.TabIndex = 2
        Me.buttonActivate.Text = "Activate"
        Me.buttonActivate.UseVisualStyleBackColor = True
        '
        'valueScreenSaverActive
        '
        Me.valueScreenSaverActive.AutoSize = True
        Me.valueScreenSaverActive.Location = New System.Drawing.Point(142, 18)
        Me.valueScreenSaverActive.Name = "valueScreenSaverActive"
        Me.valueScreenSaverActive.Size = New System.Drawing.Size(35, 13)
        Me.valueScreenSaverActive.TabIndex = 1
        Me.valueScreenSaverActive.Text = "<null>"
        '
        'labelScreenSaverActive
        '
        Me.labelScreenSaverActive.AutoSize = True
        Me.labelScreenSaverActive.Location = New System.Drawing.Point(28, 18)
        Me.labelScreenSaverActive.Name = "labelScreenSaverActive"
        Me.labelScreenSaverActive.Size = New System.Drawing.Size(108, 13)
        Me.labelScreenSaverActive.TabIndex = 0
        Me.labelScreenSaverActive.Text = "ScreenSaver Active :"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.valueKillState)
        Me.GroupBox2.Controls.Add(Me.buttonStartStopTimer)
        Me.GroupBox2.Controls.Add(Me.labelSeconds)
        Me.GroupBox2.Controls.Add(Me.entryKillPeriod)
        Me.GroupBox2.Controls.Add(Me.labelPeriod)
        Me.GroupBox2.ForeColor = System.Drawing.Color.Lime
        Me.GroupBox2.Location = New System.Drawing.Point(12, 150)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(343, 82)
        Me.GroupBox2.TabIndex = 1
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "Periodic Kill Timer"
        '
        'valueKillState
        '
        Me.valueKillState.AutoSize = True
        Me.valueKillState.Location = New System.Drawing.Point(268, 20)
        Me.valueKillState.Name = "valueKillState"
        Me.valueKillState.Size = New System.Drawing.Size(13, 13)
        Me.valueKillState.TabIndex = 4
        Me.valueKillState.Text = "0"
        '
        'buttonStartStopTimer
        '
        Me.buttonStartStopTimer.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.buttonStartStopTimer.Location = New System.Drawing.Point(239, 37)
        Me.buttonStartStopTimer.Name = "buttonStartStopTimer"
        Me.buttonStartStopTimer.Size = New System.Drawing.Size(66, 23)
        Me.buttonStartStopTimer.TabIndex = 3
        Me.buttonStartStopTimer.Text = "Start Timer"
        Me.buttonStartStopTimer.UseVisualStyleBackColor = True
        '
        'labelSeconds
        '
        Me.labelSeconds.AutoSize = True
        Me.labelSeconds.Location = New System.Drawing.Point(132, 42)
        Me.labelSeconds.Name = "labelSeconds"
        Me.labelSeconds.Size = New System.Drawing.Size(47, 13)
        Me.labelSeconds.TabIndex = 2
        Me.labelSeconds.Text = "seconds"
        '
        'entryKillPeriod
        '
        Me.entryKillPeriod.Location = New System.Drawing.Point(69, 40)
        Me.entryKillPeriod.Name = "entryKillPeriod"
        Me.entryKillPeriod.Size = New System.Drawing.Size(57, 20)
        Me.entryKillPeriod.TabIndex = 1
        Me.entryKillPeriod.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.entryKillPeriod.Value = New Decimal(New Integer() {8, 0, 0, 0})
        '
        'labelPeriod
        '
        Me.labelPeriod.AutoSize = True
        Me.labelPeriod.Location = New System.Drawing.Point(26, 42)
        Me.labelPeriod.Name = "labelPeriod"
        Me.labelPeriod.Size = New System.Drawing.Size(37, 13)
        Me.labelPeriod.TabIndex = 0
        Me.labelPeriod.Text = "Period"
        '
        'buttonClose
        '
        Me.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.Popup
        Me.buttonClose.Location = New System.Drawing.Point(277, 246)
        Me.buttonClose.Name = "buttonClose"
        Me.buttonClose.Size = New System.Drawing.Size(77, 19)
        Me.buttonClose.TabIndex = 2
        Me.buttonClose.Text = "Close"
        Me.buttonClose.UseVisualStyleBackColor = True
        '
        'ScreenSaverTest
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.BackColor = System.Drawing.Color.Black
        Me.ClientSize = New System.Drawing.Size(366, 277)
        Me.Controls.Add(Me.buttonClose)
        Me.Controls.Add(Me.GroupBox2)
        Me.Controls.Add(Me.GroupBox1)
        Me.ForeColor = System.Drawing.Color.Lime
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
        Me.Name = "ScreenSaverTest"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "ScreenSaver_Control"
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox1.PerformLayout()
        CType(Me.entryScreensaverTimeout, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox2.ResumeLayout(False)
        Me.GroupBox2.PerformLayout()
        CType(Me.entryKillPeriod, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents buttonActivate As System.Windows.Forms.Button
    Friend WithEvents valueScreenSaverActive As System.Windows.Forms.Label
    Friend WithEvents labelScreenSaverActive As System.Windows.Forms.Label
    Friend WithEvents valueScreensaverTimeout As System.Windows.Forms.Label
    Friend WithEvents labelScreensaverTimeout As System.Windows.Forms.Label
    Friend WithEvents buttonRestore As System.Windows.Forms.Button
    Friend WithEvents buttonRefresh As System.Windows.Forms.Button
    Friend WithEvents buttonUpdateTimeout As System.Windows.Forms.Button
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents labelPeriod As System.Windows.Forms.Label
    Friend WithEvents buttonClose As System.Windows.Forms.Button
    Friend WithEvents buttonStartStopTimer As System.Windows.Forms.Button
    Friend WithEvents labelSeconds As System.Windows.Forms.Label
    Friend WithEvents valueKillState As System.Windows.Forms.Label
    Private WithEvents entryScreensaverTimeout As System.Windows.Forms.NumericUpDown
    Private WithEvents entryKillPeriod As System.Windows.Forms.NumericUpDown
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Retired
United States United States
I am currently retired.
I have no degree but I have some programming experience
when I was in college(Cobol, Pascal).

My accomplishments thus far are;
Best VB.Net article for January(2009)
Best VB.Net article for July(2009)

Comments and Discussions