Click here to Skip to main content
15,891,513 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalc# Main Pin
MikeMarq26-Sep-07 14:52
MikeMarq26-Sep-07 14:52 
GeneralRe: c# Main Pin
Dave Doknjas26-Sep-07 15:21
Dave Doknjas26-Sep-07 15:21 
Generalc# Formats Pin
MikeMarq26-Sep-07 14:53
MikeMarq26-Sep-07 14:53 
GeneralRe: c# Formats Pin
Dave Doknjas26-Sep-07 15:22
Dave Doknjas26-Sep-07 15:22 
Generalc# Devices Pin
MikeMarq26-Sep-07 14:53
MikeMarq26-Sep-07 14:53 
Generalc# assembly info Pin
MikeMarq26-Sep-07 15:08
MikeMarq26-Sep-07 15:08 
GeneralRe: c# assembly info Pin
Dave Doknjas26-Sep-07 15:25
Dave Doknjas26-Sep-07 15:25 
GeneralRe: c# Devices Pin
Dave Doknjas26-Sep-07 15:25
Dave Doknjas26-Sep-07 15:25 
(via Instant VB)

'----------------------------------------------------------------------------
' File: Devices.cs
'
' Copyright (c) Microsoft Corp. All rights reserved.
'-----------------------------------------------------------------------------
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports Microsoft.DirectX.DirectSound

Public Class DevicesForm
Inherits Form
Private WithEvents buttonOk As Button
Private WithEvents buttonCancel As Button
Private WithEvents labelStatic As Label
Private WithEvents comboboxCaptureDeviceCombo As ComboBox
Private mf As MainForm = Nothing

Private devices As CaptureDevicesCollection = New CaptureDevicesCollection()

Public Sub New(ByVal mf As MainForm)
'
' Required for Windows Form Designer support
'
InitializeComponent()
Me.mf = mf

For Each info As DeviceInformation In devices
comboboxCaptureDeviceCombo.Items.Add(info.Description)
Next info

comboboxCaptureDeviceCombo.SelectedIndex = 0
End Sub
#Region "InitializeComponent code"
Private Sub InitializeComponent()
Me.buttonOk = New System.Windows.Forms.Button()
Me.buttonCancel = New System.Windows.Forms.Button()
Me.labelStatic = New System.Windows.Forms.Label()
Me.comboboxCaptureDeviceCombo = New System.Windows.Forms.ComboBox()
Me.SuspendLayout()
'
' buttonOk
'
Me.buttonOk.Location = New System.Drawing.Point(10, 41)
Me.buttonOk.Name = "buttonOk"
Me.buttonOk.Size = New System.Drawing.Size(75, 23)
Me.buttonOk.TabIndex = 0
Me.buttonOk.Text = "OK"
'Me.buttonOk.Click += New System.EventHandler(Me.buttonOk_Click);
'
' buttonCancel
'
Me.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.buttonCancel.Location = New System.Drawing.Point(231, 41)
Me.buttonCancel.Name = "buttonCancel"
Me.buttonCancel.Size = New System.Drawing.Size(75, 23)
Me.buttonCancel.TabIndex = 1
Me.buttonCancel.Text = "Cancel"
'Me.buttonCancel.Click += New System.EventHandler(Me.buttonCancel_Click);
'
' labelStatic
'
Me.labelStatic.Location = New System.Drawing.Point(0, 14)
Me.labelStatic.Name = "labelStatic"
Me.labelStatic.Size = New System.Drawing.Size(88, 13)
Me.labelStatic.TabIndex = 2
Me.labelStatic.Text = "Capture Device:"
'Me.labelStatic.Click += New System.EventHandler(Me.labelStatic_Click);
'
' comboboxCaptureDeviceCombo
'
Me.comboboxCaptureDeviceCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.comboboxCaptureDeviceCombo.Location = New System.Drawing.Point(93, 11)
Me.comboboxCaptureDeviceCombo.Name = "comboboxCaptureDeviceCombo"
Me.comboboxCaptureDeviceCombo.Size = New System.Drawing.Size(213, 21)
Me.comboboxCaptureDeviceCombo.Sorted = True
Me.comboboxCaptureDeviceCombo.TabIndex = 3
'Me.comboboxCaptureDeviceCombo.SelectedIndexChanged += New System.EventHandler(Me.comboboxCaptureDeviceCombo_SelectedIndexChanged);
'
' DevicesForm
'
Me.AcceptButton = Me.buttonOk
Me.CancelButton = Me.buttonCancel
Me.ClientSize = New System.Drawing.Size(316, 79)
Me.Controls.Add(Me.buttonOk)
Me.Controls.Add(Me.buttonCancel)
Me.Controls.Add(Me.labelStatic)
Me.Controls.Add(Me.comboboxCaptureDeviceCombo)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Name = "DevicesForm"
Me.Text = "Select Capture Device"
Me.ResumeLayout(False)

End Sub
#End Region
Private Sub buttonOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles buttonOk.Click
If 0 < comboboxCaptureDeviceCombo.Items.Count Then
mf.CaptureDeviceGuid = devices(0).DriverGuid
End If

Close()
End Sub

Private Sub buttonCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles buttonCancel.Click

End Sub

Private Sub labelStatic_Click(ByVal sender As Object, ByVal e As EventArgs) Handles labelStatic.Click

End Sub

Private Sub comboboxCaptureDeviceCombo_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles comboboxCaptureDeviceCombo.SelectedIndexChanged

End Sub
End Class


David Anton
http://www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
C++ to VB Converter: converts C++ to VB
C++ to Java Converter: converts C++ to Java
Instant C++: converts C# to C++/CLI and VB to C++/CLI
GeneralRe: Help on code translated from c# Pin
MikeMarq26-Sep-07 18:18
MikeMarq26-Sep-07 18:18 
GeneralRe: Help on code translated from c# Pin
Dave Doknjas27-Sep-07 5:16
Dave Doknjas27-Sep-07 5:16 
Questionwhat this code means? Pin
ArielR26-Sep-07 8:07
ArielR26-Sep-07 8:07 
AnswerRe: what this code means? Pin
ESTAN26-Sep-07 9:04
ESTAN26-Sep-07 9:04 
AnswerRe: what this code means? Pin
Luc Pattyn26-Sep-07 9:10
sitebuilderLuc Pattyn26-Sep-07 9:10 
GeneralRe: what this code means? Pin
ESTAN26-Sep-07 9:13
ESTAN26-Sep-07 9:13 
GeneralRe: what this code means? Pin
ArielR26-Sep-07 10:20
ArielR26-Sep-07 10:20 
AnswerRe: what this code means? Pin
Guffa26-Sep-07 9:11
Guffa26-Sep-07 9:11 
AnswerRe: what this code means? Pin
Christian Graus26-Sep-07 12:50
protectorChristian Graus26-Sep-07 12:50 
QuestionHow to filter data on Crystal Reports? Pin
shyne726-Sep-07 5:02
shyne726-Sep-07 5:02 
QuestionHow to know which control is selected at runtime for runtime generated controls Pin
VB 8.026-Sep-07 1:56
VB 8.026-Sep-07 1:56 
AnswerRe: How to know which control is selected at runtime for runtime generated controls Pin
ESTAN26-Sep-07 12:54
ESTAN26-Sep-07 12:54 
GeneralRe: How to know which control is selected at runtime for runtime generated controls Pin
VB 8.027-Sep-07 3:19
VB 8.027-Sep-07 3:19 
QuestionRe: How to know which control is selected at runtime for runtime generated controls Pin
ESTAN27-Sep-07 5:38
ESTAN27-Sep-07 5:38 
QuestionLoad an OLE Image from Access 03 to Word 03 Pin
Plation26-Sep-07 1:43
Plation26-Sep-07 1:43 
AnswerRe: Load an OLE Image from Access 03 to Word 03 Pin
Plation27-Sep-07 4:10
Plation27-Sep-07 4:10 
QuestionVB.Net: Setting the SelectedNode and SelectedItem font in Treeview and Listview Controls Pin
Mbire26-Sep-07 0:49
Mbire26-Sep-07 0:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.