Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
AddCam.vb
Package: capsample_src.zip [view]
Upload User: wuming6209
Upload Date: 2013-06-06
Package Size: 161k
Code Size: 5k
Category:
Video Capture
Development Platform:
Visual C++
- Imports DirectX.Capture
- Public Class AddCam
- Inherits System.Windows.Forms.Form
- #Region " C骴igo generado por el Dise馻dor de Windows Forms "
- Public Sub New()
- MyBase.New()
- 'El Dise馻dor de Windows Forms requiere esta llamada.
- InitializeComponent()
- 'Agregar cualquier inicializaci髇 despu閟 de la llamada a InitializeComponent()
- Dim j As Short
- Dim f As Filter
- 'Add to cboCamaras available cameras
- cboCamaras.Items.Clear()
- For j = 0 To Dispositivos.VideoInputDevices.Count - 1
- f = Dispositivos.VideoInputDevices(j)
- cboCamaras.Items.Add(f.Name)
- Next
- End Sub
- 'Form reemplaza a Dispose para limpiar la lista de componentes.
- 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
- 'Requerido por el Dise馻dor de Windows Forms
- Private components As System.ComponentModel.IContainer
- 'NOTA: el Dise馻dor de Windows Forms requiere el siguiente procedimiento
- 'Puede modificarse utilizando el Dise馻dor de Windows Forms.
- 'No lo modifique con el editor de c骴igo.
- Friend WithEvents cboCamaras As System.Windows.Forms.ComboBox
- Public WithEvents cmdCancel As System.Windows.Forms.Button
- Public WithEvents cmdOK As System.Windows.Forms.Button
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.cboCamaras = New System.Windows.Forms.ComboBox()
- Me.cmdCancel = New System.Windows.Forms.Button()
- Me.cmdOK = New System.Windows.Forms.Button()
- Me.SuspendLayout()
- '
- 'cboCamaras
- '
- Me.cboCamaras.Anchor = (System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right)
- Me.cboCamaras.Location = New System.Drawing.Point(40, 16)
- Me.cboCamaras.Name = "cboCamaras"
- Me.cboCamaras.Size = New System.Drawing.Size(184, 21)
- Me.cboCamaras.TabIndex = 4
- Me.cboCamaras.Text = "Click to chose a camera"
- '
- 'cmdCancel
- '
- Me.cmdCancel.Anchor = (System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right)
- Me.cmdCancel.BackColor = System.Drawing.SystemColors.Control
- Me.cmdCancel.Cursor = System.Windows.Forms.Cursors.Default
- Me.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.cmdCancel.ForeColor = System.Drawing.SystemColors.ControlText
- Me.cmdCancel.Location = New System.Drawing.Point(168, 56)
- Me.cmdCancel.Name = "cmdCancel"
- Me.cmdCancel.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.cmdCancel.Size = New System.Drawing.Size(81, 25)
- Me.cmdCancel.TabIndex = 5
- Me.cmdCancel.Text = "Cancel"
- '
- 'cmdOK
- '
- Me.cmdOK.Anchor = (System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right)
- Me.cmdOK.BackColor = System.Drawing.SystemColors.Control
- Me.cmdOK.Cursor = System.Windows.Forms.Cursors.Default
- Me.cmdOK.ForeColor = System.Drawing.SystemColors.ControlText
- Me.cmdOK.Location = New System.Drawing.Point(72, 56)
- Me.cmdOK.Name = "cmdOK"
- Me.cmdOK.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.cmdOK.Size = New System.Drawing.Size(81, 25)
- Me.cmdOK.TabIndex = 3
- Me.cmdOK.Text = "OK"
- '
- 'AddCam
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
- Me.ClientSize = New System.Drawing.Size(264, 93)
- Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cboCamaras, Me.cmdCancel, Me.cmdOK})
- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "AddCam"
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "AddCam"
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Private Sub cmdOK_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdOK.Click
- Dim IdVentana As String
- If cboCamaras.SelectedItem = Nothing Then
- MsgBox("Select an available camera.", MsgBoxStyle.Exclamation, "Error")
- Exit Sub
- End If
- CaptureInformation.Camera = Dispositivos.VideoInputDevices(cboCamaras.SelectedIndex)
- CaptureInformation.CaptureInfo = New Capture(CaptureInformation.Camera, Nothing)
- Me.Dispose()
- End Sub
- Private Sub cmdCancel_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdCancel.Click
- Me.Dispose()
- End Sub
- End Class