home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
- Object = "{F9F138BB-2119-11D2-9F09-444553540000}#2.0#0"; "MaqMidia302.ocx"
- Begin VB.Form Form1
- Caption = "Maquisistem Midia - MP3 - OCX 2.1"
- ClientHeight = 5985
- ClientLeft = 60
- ClientTop = 630
- ClientWidth = 9735
- LinkTopic = "Form1"
- ScaleHeight = 5985
- ScaleWidth = 9735
- StartUpPosition = 2 'CenterScreen
- WindowState = 2 'Maximized
- Begin MaqMidia30.MaqMidia MaqMidia1
- Height = 1695
- Left = 6600
- TabIndex = 46
- Top = 1440
- Width = 2055
- _ExtentX = 3625
- _ExtentY = 2990
- End
- Begin VB.CommandButton Command13
- Caption = "Force the size of the control"
- Height = 495
- Left = 5160
- TabIndex = 43
- Top = 1560
- Width = 1335
- End
- Begin VB.CommandButton Command12
- Caption = "1/10 of a second to refresh the control"
- Height = 615
- Left = 3480
- TabIndex = 42
- Top = 4320
- Width = 1575
- End
- Begin VB.CommandButton Command11
- Caption = "1/2 of a second to refresh the control"
- Height = 615
- Left = 1800
- TabIndex = 41
- Top = 4320
- Width = 1575
- End
- Begin VB.CommandButton Command10
- Caption = "2 seconds to refresh the control"
- Height = 615
- Left = 120
- TabIndex = 40
- Top = 4320
- Width = 1575
- End
- Begin VB.CommandButton Command1
- Caption = "Play"
- Height = 495
- Left = 2520
- TabIndex = 39
- Top = 360
- Width = 1095
- End
- Begin ComctlLib.Slider Slider10
- Height = 495
- Left = 4200
- TabIndex = 36
- Top = 3600
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 873
- _Version = 327682
- Max = 12
- SelStart = 12
- Value = 12
- End
- Begin ComctlLib.Slider Slider9
- Height = 615
- Left = 1440
- TabIndex = 31
- Top = 3600
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 1085
- _Version = 327682
- Max = 12
- End
- Begin ComctlLib.Slider Slider8
- Height = 495
- Left = 4200
- TabIndex = 30
- Top = 3120
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 873
- _Version = 327682
- Max = 12
- End
- Begin ComctlLib.Slider Slider7
- Height = 495
- Left = 4200
- TabIndex = 29
- Top = 2160
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 873
- _Version = 327682
- Max = 12
- End
- Begin ComctlLib.Slider Slider6
- Height = 495
- Left = 4200
- TabIndex = 28
- Top = 2640
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 873
- _Version = 327682
- Max = 12
- End
- Begin VB.CheckBox Check3
- Caption = "Autoplay"
- Height = 255
- Left = 3720
- TabIndex = 27
- Top = 360
- Value = 1 'Checked
- Width = 1095
- End
- Begin VB.CheckBox Check2
- Caption = "PlayBar"
- Height = 255
- Left = 1320
- TabIndex = 23
- Top = 360
- Value = 1 'Checked
- Width = 1095
- End
- Begin ComctlLib.Slider Slider5
- Height = 495
- Left = 7920
- TabIndex = 21
- Top = 0
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 873
- _Version = 327682
- End
- Begin VB.CommandButton Command6
- Caption = "Play fullscreen"
- Height = 495
- Left = 3720
- TabIndex = 20
- Top = 960
- Width = 1335
- End
- Begin ComctlLib.Slider Slider4
- Height = 495
- Left = 1440
- TabIndex = 18
- Top = 2160
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 873
- _Version = 327682
- Max = 12
- End
- Begin VB.CommandButton Command4
- Caption = "Force Movie to fit 100 %"
- Height = 495
- Left = 5160
- TabIndex = 17
- Top = 960
- Width = 1335
- End
- Begin VB.CommandButton Command2
- Caption = "Play Reverse"
- Height = 495
- Left = 3720
- TabIndex = 16
- Top = 1560
- Width = 1335
- End
- Begin ComctlLib.Slider Slider3
- Height = 495
- Left = 1440
- TabIndex = 12
- Top = 2640
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 873
- _Version = 327682
- Max = 12
- End
- Begin ComctlLib.Slider Slider2
- Height = 495
- Left = 1440
- TabIndex = 11
- Top = 3120
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 873
- _Version = 327682
- Max = 12
- End
- Begin VB.CommandButton Command9
- Caption = "Rewind"
- Height = 495
- Left = 120
- TabIndex = 10
- Top = 1560
- Width = 1095
- End
- Begin VB.CommandButton Command8
- Caption = "FastFoward"
- Height = 495
- Left = 1320
- TabIndex = 9
- Top = 1560
- Width = 1095
- End
- Begin ComctlLib.Slider Slider1
- Height = 495
- Left = 4800
- TabIndex = 8
- Top = 0
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 873
- _Version = 327682
- End
- Begin VB.CommandButton Command5
- Caption = "Resume "
- Height = 495
- Left = 1320
- TabIndex = 7
- Top = 960
- Width = 1095
- End
- Begin VB.CommandButton Command17
- Caption = "Hide"
- Height = 495
- Left = 2520
- TabIndex = 6
- Top = 1560
- Width = 1095
- End
- Begin VB.CommandButton Command16
- Caption = "Pause"
- Height = 495
- Left = 120
- TabIndex = 4
- Top = 960
- Width = 1095
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 120
- TabIndex = 3
- Top = 0
- Width = 3495
- End
- Begin VB.CommandButton Command7
- Caption = "Select file"
- Height = 495
- Left = 120
- TabIndex = 2
- Top = 360
- Width = 1095
- End
- Begin VB.CheckBox Check1
- Caption = "Loop"
- Height = 195
- Left = 1320
- TabIndex = 5
- Top = 600
- Width = 855
- End
- Begin VB.CommandButton Command3
- Caption = "Stop"
- Height = 495
- Left = 2520
- TabIndex = 0
- Top = 960
- Width = 1095
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 720
- Top = 240
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327681
- End
- Begin VB.Label Label3
- Height = 255
- Left = 6480
- TabIndex = 45
- Top = 4320
- Width = 1335
- End
- Begin VB.Label Label1
- Caption = "Mode : "
- Height = 255
- Left = 5640
- TabIndex = 44
- Top = 4320
- Width = 615
- End
- Begin VB.Label Label17
- Caption = "<- this volume control dont affect the mixer volume controls , but cannot be applied to all devices"
- Height = 375
- Left = 5640
- TabIndex = 38
- Top = 3720
- Width = 4095
- End
- Begin VB.Label Label16
- Caption = "Internal Volume"
- Height = 255
- Left = 3000
- TabIndex = 37
- Top = 3720
- Width = 1335
- End
- Begin VB.Label Label15
- Caption = "Microfone"
- Height = 255
- Left = 3000
- TabIndex = 35
- Top = 3240
- Width = 1095
- End
- Begin VB.Label Label14
- Caption = "Line in"
- Height = 255
- Left = 3000
- TabIndex = 34
- Top = 2760
- Width = 1095
- End
- Begin VB.Label Label13
- Caption = "PC speaker"
- Height = 255
- Left = 3000
- TabIndex = 33
- Top = 2280
- Width = 1095
- End
- Begin VB.Label Label12
- Caption = "CD audio"
- Height = 255
- Left = 240
- TabIndex = 32
- Top = 3720
- Width = 975
- End
- Begin VB.Label Label11
- Height = 255
- Left = 8280
- TabIndex = 15
- Top = 1080
- Width = 855
- End
- Begin VB.Label Label10
- Caption = "Length in miliseconds"
- Height = 255
- Left = 6720
- TabIndex = 26
- Top = 1080
- Width = 1695
- End
- Begin VB.Label Label9
- Height = 375
- Left = 7440
- TabIndex = 25
- Top = 600
- Width = 735
- End
- Begin VB.Label Label8
- Caption = "Length"
- Height = 255
- Left = 6720
- TabIndex = 24
- Top = 600
- Width = 615
- End
- Begin VB.Label Label7
- Caption = "MP3,Movie speed"
- Height = 255
- Left = 6600
- TabIndex = 22
- ToolTipText = "Click here to default speed"
- Top = 120
- Width = 1815
- End
- Begin VB.Label Label6
- Caption = "Wav,Movie vol"
- Height = 255
- Left = 120
- TabIndex = 19
- Top = 2280
- Width = 1335
- End
- Begin VB.Label Label5
- Caption = "Master Volume"
- Height = 255
- Left = 240
- TabIndex = 14
- Top = 3240
- Width = 1215
- End
- Begin VB.Label Label4
- Caption = "Midi Volume"
- Height = 255
- Left = 240
- TabIndex = 13
- Top = 2760
- Width = 855
- End
- Begin VB.Label Label2
- Caption = "Midi Speed"
- Height = 255
- Left = 3960
- TabIndex = 1
- Top = 120
- Width = 855
- End
- Begin VB.Menu about
- Caption = "About"
- NegotiatePosition= 3 'Right
- WindowList = -1 'True
- End
- Begin VB.Menu option1
- Caption = "Options"
- NegotiatePosition= 2 'Middle
- Visible = 0 'False
- Begin VB.Menu abrir
- Caption = "Open file to play"
- End
- Begin VB.Menu sobre
- Caption = "About"
- End
- Begin VB.Menu sair
- Caption = "Exit"
- End
- End
- Begin VB.Menu hlp
- Caption = "Help"
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Public comando As String
- Public Myposition
- Private Sub about_Click()
- MaqMidia1.AboutBox
- End Sub
- Private Sub Command1_Click()
- MaqMidia1.Play
- End Sub
- Private Sub Command10_Click()
- MaqMidia1.ControlFreq 2000 'in miliseconds to refresh all the events in the control
- '2000 = two seconds
- End Sub
- Private Sub Command11_Click()
- MaqMidia1.ControlFreq 500 'in miliseconds to refresh all the events in the control
- '500 = 1/2 of a second
- End Sub
- Private Sub Command12_Click()
- MaqMidia1.ControlFreq 100 'in miliseconds to refresh all the events in the control
- '2000 = two seconds
- End Sub
- Private Sub Command13_Click()
- MaqMidia1.Width = 2800
- MaqMidia1.Height = 2000
- MaqMidia1.ResizeControl
- End Sub
- Private Sub Command16_Click()
- MaqMidia1.PauseMidia
- End Sub
- Private Sub Command17_Click()
- If Command17.Caption = "Hide" Then
- Command17.Caption = "Show"
- MaqMidia1.Visible = False
- Command17.Caption = "Hide"
- MaqMidia1.Visible = True
- End If
- End Sub
- Private Sub Command2_Click()
- MaqMidia1.PlayReverse False
- End Sub
- Private Sub Command3_Click()
- MaqMidia1.StopMidia
- End Sub
- Private Sub Command4_Click()
- MaqMidia1.ResizeWindow 100
- End Sub
- Private Sub Command5_Click()
- MaqMidia1.ResumeMidia
- End Sub
- Private Sub Command6_Click()
- MaqMidia1.MovieFullScreen True 'if true this will force the resume of the playback when you try to return of the fullscreen mode
- End Sub
- Private Sub Command7_Click()
- MaqMidia1.PlaybackBar = Check2.Value
- CommonDialog1.Filter = "MultiMidia files|*.mp3;*.wav;*.mid;*.mpg;*.mov;*.avi;*.cda;|"
- CommonDialog1.FilterIndex = 1
- CommonDialog1.ShowOpen
- Text1.Text = CommonDialog1.filename
- MaqMidia1.Midiafile CommonDialog1.filename, Check1.Value, Check3.Value
- End Sub
- Private Sub Command8_Click()
- MaqMidia1.SeekTo (Myposition + 600) 'insert a formula or a new value to change the position of the playback
- End Sub
- Private Sub Command9_Click()
- MaqMidia1.SeekTo (Myposition - 600) 'insert a formula or a new value to change the position of the playback
- End Sub
- Private Sub Form_Activate()
- MaqMidia1.InitializeMixer
- If comando <> "" Then
- MaqMidia1.StopMidia
- MaqMidia1.PlaybackBar = Check2.Value
- Text1.Text = comando
- MaqMidia1.Midiafile comando, False, True
- MaqMidia1.PlaybackBar = True
- comando = ""
- End If
- 'this force the refresh of the slider control to reflect the correct value of the volume control
- End Sub
- Private Sub Form_Load()
- 'this rotine will make
- 'media files to this application
- 'start automatically
- If Command <> "" Then
- comando = Command
- End If
- Slider1.Min = 0
- Slider1.Max = 20
- Slider1.Value = 10
- Slider5.Min = 0
- Slider5.Max = 50
- Slider5.Value = 25
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- MaqMidia1.StopMidia
- End Sub
- Private Sub Form_Resize()
- 'this is the code to automatic resize the control
- Exit Sub 'delete this command to make the control resize
- MaqMidia1.Width = Form1.Width / 3
- MaqMidia1.Height = Form1.Height / 3
- MaqMidia1.ResizeControl
- End Sub
- Private Sub Form_Terminate()
- MaqMidia1.StopMidia
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- MaqMidia1.StopMidia
- End Sub
- Private Sub hlp_Click()
- Dim retval
- retval = Shell("Winhlp32 MAQMID302.HLP", 1)
- End Sub
- Private Sub Label7_Click()
- Slider5.Value = 25
- MaqMidia1.MidiaSpeed (Slider5.Value * 40)
- End Sub
- Private Sub MaqMidia1_CDVolumeRefresh(LeftVolume As Long, RightVolume As Long)
- If LeftVolume <> RightVolume Then
- Slider9.Value = ((LeftVolume + RightVolume) / 2) ' if you have two sliders to rigth or left channel then set any channel to the repective output
- Slider9.Value = LeftVolume
- End If
- End Sub
- Private Sub MaqMidia1_Click()
- MsgBox "click"
- End Sub
- Private Sub MaqMidia1_Click2(Mybutton As Integer)
- MsgBox Mybutton
- End Sub
- Private Sub MaqMidia1_DblClick()
- MsgBox "double click"
- End Sub
- Private Sub MaqMidia1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
- MsgBox "drag over " & State
- End Sub
- Private Sub MaqMidia1_Finished()
- Me.Caption = "Playback finished"
- End Sub
- Private Sub MaqMidia1_LineVolumeRefresh(LeftVolume As Long, RightVolume As Long)
- If LeftVolume <> RightVolume Then
- Slider6.Value = ((LeftVolume + RightVolume) / 2) ' if you have two sliders to rigth or left channel then set any channel to the repective output
- Slider6.Value = LeftVolume
- End If
- End Sub
- Private Sub MaqMidia1_MasterVolumeRefresh(LeftVolume As Long, RightVolume As Long)
- If LeftVolume <> RightVolume Then
- Slider2.Value = ((LeftVolume + RightVolume) / 2) ' if you have two sliders to rigth or left channel then set any channel to the repective output
- Slider2.Value = LeftVolume
- End If
- End Sub
- Private Sub MaqMidia1_MCIError(ErrorCode As String)
- MsgBox ErrorCode
- End Sub
- Private Sub MaqMidia1_MicroVolumeRefresh(LeftVolume As Long)
- Slider8.Value = LeftVolume
- End Sub
- Private Sub MaqMidia1_MidiaLength(Length As String)
- Label9.Caption = Length
- End Sub
- Private Sub MaqMidia1_MidiaPosition(Length As String)
- Form1.Caption = Length
- End Sub
- Private Sub MaqMidia1_MidiVolumeRefresh(LeftVolume As Long, RightVolume As Long)
- 'MsgBox LeftVolume & " " & RightVolume
- If LeftVolume <> RightVolume Then
- Slider3.Value = ((LeftVolume + RightVolume) / 2) ' if you have two sliders to rigth or left channel then set any channel to the repective output
- Slider3.Value = LeftVolume
- End If
- End Sub
- Private Sub MaqMidia1_Modechanged(Mymode As String)
- Label3.Caption = Mymode
- End Sub
- Private Sub MaqMidia1_PCVolumeRefresh(LeftVolume As Long)
- Slider7.Value = LeftVolume
- End Sub
- Private Sub MaqMidia1_PositionChanged(Position As Long)
- Myposition = Position
- Label11.Caption = Position
- End Sub
- Private Sub MaqMidia1_WaveMovieVolumeRefresh(LeftVolume As Long, RightVolume As Long)
- 'MsgBox LeftVolume & " " & RightVolume
- If LeftVolume <> RightVolume Then
- Slider4.Value = ((LeftVolume + RightVolume) / 2) ' if you have two sliders to rigth or left channel then set any channel to the repective output
- Slider4.Value = LeftVolume
- End If
- End Sub
- Private Sub option_Click()
- MsgBox Menu
- End Sub
- Private Sub Slider1_Scroll()
- MaqMidia1.MidiTempo (Slider1.Value * 10)
- End Sub
- Private Sub Slider10_Scroll()
- MaqMidia1.InternalVolume (Slider10.Value)
- End Sub
- Private Sub Slider2_Scroll()
- MaqMidia1.MasterVolumeSet Slider2.Value, Slider2.Value
- End Sub
- Private Sub Slider3_scroll()
- MaqMidia1.MidiVolumeSet Slider3.Value, Slider3.Value
- End Sub
- Private Sub Slider4_Scroll()
- MaqMidia1.WaveMovieVolumeSet Slider4.Value, Slider4.Value
- End Sub
- Private Sub Slider5_scroll()
- MaqMidia1.MidiaSpeed (Slider5.Value * 40)
- End Sub
- Private Sub Slider6_scroll()
- MaqMidia1.LineVolumeSet Slider6.Value, Slider6.Value
- End Sub
- Private Sub Slider7_scroll()
- MaqMidia1.PCVolumeSet Slider7.Value
- End Sub
- Private Sub Slider8_scroll()
- MaqMidia1.MicroVolumeSet Slider8.Value
- End Sub
- Private Sub Slider9_scroll()
- MaqMidia1.CDVolumeSet Slider9.Value, Slider9.Value
- End Sub
-