home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{9A2F8DF9-6A84-11D2-B62A-00201853CFCC}#4.0#0"; "MODControl.ocx"
- Begin VB.Form frmTst
- Caption = "THEMA MIDAS MODControl example program"
- ClientHeight = 4950
- ClientLeft = 60
- ClientTop = 330
- ClientWidth = 5310
- LinkTopic = "Form1"
- ScaleHeight = 4950
- ScaleWidth = 5310
- StartUpPosition = 3 'Windows Default
- Begin VB.HScrollBar HScroll1
- Height = 210
- LargeChange = 10
- Left = 900
- Max = 100
- TabIndex = 7
- Top = 4650
- Value = 100
- Width = 4245
- End
- Begin VB.CommandButton Command1
- Caption = "Play Module"
- BeginProperty Font
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 165
- TabIndex = 5
- Top = 3930
- Width = 5010
- End
- Begin VB.FileListBox File1
- Height = 3210
- Left = 2385
- Pattern = "*.mod;*.xm"
- TabIndex = 4
- Top = 645
- Width = 2820
- End
- Begin VB.DirListBox Dir1
- Height = 2790
- Left = 105
- TabIndex = 3
- Top = 1035
- Width = 2205
- End
- Begin VB.DriveListBox Drive1
- Height = 315
- Left = 105
- TabIndex = 2
- Top = 630
- Width = 2220
- End
- Begin MODControl.MODCtrl MODCtrl1
- Left = 180
- Top = 690
- _ExtentX = 8890
- _ExtentY = 5530
- End
- Begin VB.Label Label3
- Caption = "Volume:"
- BeginProperty Font
- Name = "Arial"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 210
- Left = 165
- TabIndex = 6
- Top = 4650
- Width = 780
- End
- Begin VB.Label Label2
- Caption = "Special thankx to HouseMarque and David Brebner"
- BeginProperty Font
- Name = "Arial"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 120
- TabIndex = 1
- Top = 300
- Width = 5115
- End
- Begin VB.Label Label1
- Caption = "by Maarten van Gompel"
- BeginProperty Font
- Name = "Arial"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 105
- TabIndex = 0
- Top = 45
- Width = 3390
- End
- Attribute VB_Name = "frmTst"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Playing As Boolean
- Private Sub Command1_Click()
- Dim File As String
- If Command1.Caption = "Play Module" Then
- 'Set File
- If Len(Dir1.Path) = 3 Then
- File = Dir1.Path + File1.filename
- File = Dir1.Path + "\" + File1.filename
- End If
- 'Load File into MODControl
- MODCtrl1.LoadModule File
- 'Play Loaded File
- MODCtrl1.PlayModule False
- Playing = True
- 'Change text of button
- Command1.Caption = "Stop Module"
- ElseIf Command1.Caption = "Stop Module" Then
- Command1.Caption = "Play Module"
- 'Stop the module
- MODCtrl1.StopModule
- Playing = False
- End If
- End Sub
- Private Sub Dir1_Change()
- File1.Path = Dir1.Path
- End Sub
- Private Sub Drive1_Change()
- On Error Resume Next
- Dir1.Path = Drive1.Drive
- End Sub
- Private Sub Form_Load()
- 'Initialize MODControl, very important!
- MODCtrl1.Initialize
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- 'DeActivate MODControl, very important!
- MODCtrl1.Deactivate
- End Sub
- Private Sub HScroll1_Change()
- Dim Volume As Long
- If Playing Then
- Volume = HScroll1.Value
- 'set volume
- MODCtrl1.SetVolume Volume
- End If
- End Sub
-