home *** CD-ROM | disk | FTP | other *** search
/ Multimédia la Compil' 2 / Sybex_Multimedia_La_Compil_2.iso / cooltool / sysex / midiset.frm < prev    next >
Text File  |  1995-04-20  |  3KB  |  111 lines

  1. VERSION 2.00
  2. Begin Form MIDISetupForm 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "MIDI Setup"
  6.    ControlBox      =   0   'False
  7.    Height          =   1605
  8.    Left            =   1515
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   1200
  12.    ScaleWidth      =   6315
  13.    Top             =   4005
  14.    Width           =   6435
  15.    Begin CommandButton CmdCancel 
  16.       Caption         =   "Cancel"
  17.       Height          =   375
  18.       Left            =   5010
  19.       TabIndex        =   5
  20.       Top             =   690
  21.       Width           =   1005
  22.    End
  23.    Begin CommandButton CmdOk 
  24.       Caption         =   "Ok"
  25.       Height          =   375
  26.       Left            =   5010
  27.       TabIndex        =   4
  28.       Top             =   240
  29.       Width           =   1005
  30.    End
  31.    Begin ComboBox ComboMidiOut 
  32.       Height          =   300
  33.       Left            =   2460
  34.       Style           =   2  'Dropdown List
  35.       TabIndex        =   1
  36.       Top             =   540
  37.       Width           =   2265
  38.    End
  39.    Begin ComboBox ComboMidiIn 
  40.       Height          =   300
  41.       Left            =   120
  42.       Style           =   2  'Dropdown List
  43.       TabIndex        =   0
  44.       Top             =   540
  45.       Width           =   2265
  46.    End
  47.    Begin Label Label2 
  48.       BackColor       =   &H00C0C0C0&
  49.       Caption         =   "MIDI Out Device"
  50.       Height          =   255
  51.       Left            =   2490
  52.       TabIndex        =   3
  53.       Top             =   240
  54.       Width           =   2025
  55.    End
  56.    Begin Label Label1 
  57.       BackColor       =   &H00C0C0C0&
  58.       Caption         =   "MIDI In Device"
  59.       Height          =   255
  60.       Left            =   150
  61.       TabIndex        =   2
  62.       Top             =   240
  63.       Width           =   2115
  64.    End
  65. End
  66.  
  67. Sub CmdCancel_Click ()
  68.     Unload MidiSetupForm
  69. End Sub
  70.  
  71. Sub CmdOk_Click ()
  72.     MIDIInOpen
  73.     MIDIOutOpen
  74.     MidiSetupForm.Hide
  75. End Sub
  76.  
  77. Sub Form_Load ()
  78.     ' Center the form on the screen
  79.     'Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  80.  
  81.     '
  82.     ' Fill output device combo box
  83.     '
  84.     For i = -1 To FormSysex.MIDIOutput1.DeviceCount - 1
  85.         FormSysex.MIDIOutput1.DeviceID = i
  86.         ComboMidiOut.AddItem FormSysex.MIDIOutput1.ProductName
  87.     Next
  88.     '
  89.     ' Select first in list
  90.     '
  91.     ComboMidiOut.ListIndex = 0
  92.     FormSysex.MIDIOutput1.DeviceID = -1
  93.     MIDIOutOpen
  94.  
  95.     '
  96.     ' Fill input device combo box
  97.     '
  98.     For i = 0 To FormSysex.MIDIInput1.DeviceCount - 1
  99.         FormSysex.MIDIInput1.DeviceID = i
  100.         ComboMidiIn.AddItem FormSysex.MIDIInput1.ProductName
  101.     Next
  102.     '
  103.     ' Select first in list
  104.     '
  105.     ComboMidiIn.ListIndex = 0
  106.     FormSysex.MIDIInput1.DeviceID = 0
  107.     MIDIInOpen
  108.  
  109. End Sub
  110.  
  111.