home *** CD-ROM | disk | FTP | other *** search
/ Microsoft DirectX SDK 7.0 / Dx7.bin / DXF / samples / multimedia / vbsamples / dsound / src / fullduplex / frmselectdevice.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-07-06  |  3.4 KB  |  117 lines

  1. VERSION 5.00
  2. Begin VB.Form frmSelectDevice 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Select Device"
  5.    ClientHeight    =   2595
  6.    ClientLeft      =   7065
  7.    ClientTop       =   3210
  8.    ClientWidth     =   4125
  9.    Icon            =   "frmSelectDevice.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2595
  14.    ScaleWidth      =   4125
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.CommandButton cmdCancel 
  17.       Caption         =   "Cancel"
  18.       Height          =   375
  19.       Left            =   2160
  20.       TabIndex        =   6
  21.       Top             =   2040
  22.       Width           =   1575
  23.    End
  24.    Begin VB.CommandButton cmdOK 
  25.       Caption         =   "OK"
  26.       Height          =   375
  27.       Left            =   360
  28.       TabIndex        =   5
  29.       Top             =   2040
  30.       Width           =   1695
  31.    End
  32.    Begin VB.ComboBox cboSound 
  33.       Height          =   315
  34.       Left            =   120
  35.       Style           =   2  'Dropdown List
  36.       TabIndex        =   2
  37.       Top             =   1560
  38.       Width           =   3975
  39.    End
  40.    Begin VB.ComboBox cboCapture 
  41.       Height          =   315
  42.       Left            =   120
  43.       Style           =   2  'Dropdown List
  44.       TabIndex        =   1
  45.       Top             =   720
  46.       Width           =   3975
  47.    End
  48.    Begin VB.Label lblSoundDeivce 
  49.       Caption         =   "DirectSound Devices:"
  50.       Height          =   255
  51.       Left            =   120
  52.       TabIndex        =   4
  53.       Top             =   1200
  54.       Width           =   3975
  55.    End
  56.    Begin VB.Label lblCaptureDevices 
  57.       Caption         =   "DirectSoundCapture Devices:"
  58.       Height          =   255
  59.       Left            =   120
  60.       TabIndex        =   3
  61.       Top             =   480
  62.       Width           =   3855
  63.    End
  64.    Begin VB.Label lblSelect 
  65.       Caption         =   "Please select your preferred devices"
  66.       Height          =   255
  67.       Left            =   120
  68.       TabIndex        =   0
  69.       Top             =   120
  70.       Width           =   2895
  71.    End
  72. Attribute VB_Name = "frmSelectDevice"
  73. Attribute VB_GlobalNameSpace = False
  74. Attribute VB_Creatable = False
  75. Attribute VB_PredeclaredId = True
  76. Attribute VB_Exposed = False
  77. Private DX As New DirectX7
  78. Private dse As DirectSoundEnum
  79. Private dsce As DirectSoundEnum
  80. Private Sub cmdCancel_Click()
  81.     End
  82. End Sub
  83. Private Sub INIT_SOUND()
  84.     Set dse = DX.GetDSEnum
  85.     Set dsce = DX.GetDSCaptureEnum
  86. End Sub
  87. Private Sub AddInfoToCombos()
  88.     Dim i As Integer
  89.     For i = 1 To dse.GetCount
  90.         cboSound.AddItem dse.GetDescription(i)
  91.     Next
  92.     For i = 1 To dsce.GetCount
  93.         cboCapture.AddItem dsce.GetDescription(i)
  94.     Next
  95.     cboCapture.ListIndex = 0
  96.     cboSound.ListIndex = 0
  97. End Sub
  98. Private Sub cmdOK_Click()
  99.     Full.CaptureGUID = dsce.GetGuid(cboCapture.ListIndex + 1)
  100.     Full.SoundGUID = dse.GetGuid(cboSound.ListIndex + 1)
  101.     Full.SoundDesc = cboSound.Text
  102.     Full.CaptureDesc = cboCapture.Text
  103.     Unload Me
  104.     frmFormats.Show
  105. End Sub
  106. Private Sub form_load()
  107. On Error GoTo err_out
  108.     INIT_SOUND
  109.     AddInfoToCombos
  110.     Exit Sub
  111. err_out:
  112.     MsgBox "Error Starting DirectSound!", vbApplicationModal
  113.     End
  114. End Sub
  115. Private Sub subCheckFullDuplex()
  116. End Sub
  117.