[size="3"]Private Sub Form_Load() 'To position the page at the center Left = (Screen.Width - Width) \ 2 Top = (Screen.Height - Height) \ 2 myCD.Enabled = True myCD.PlayEnabled = True myCD.StopEnabled = True 'Initialize the CD myCD.Command = "Open" End Sub Private Sub myCD_StatusUpdate() 'Update the track number trackNum.Caption = myCD.Track End Sub Private Sub Next_Click() myCD.Command = "Next" End Sub Private Sub Play_Click() myCD.Command = "Play" End Sub Private Sub Previous_Click() myCD.Command = "Prev" End Sub Private Sub Stop_Click() myCD.Command = "Stop" End Sub [/size]
1 Replies - 334 Views - Last Post: 15 November 2012 - 07:54 AM
#1
How to insert a multimedia control in VB6 applications
Posted 15 November 2012 - 03:34 AM
I am learning VB from a website. I am not getting the output of the following program. no error. no output.The following is the code for playing music or video from cd player.
Replies To: How to insert a multimedia control in VB6 applications
#2
Re: How to insert a multimedia control in VB6 applications
Posted 15 November 2012 - 07:54 AM
We can't tell you anything from this.
We have no idea what the object "myCD" is. All we see is that you are sending it text commands, which itself seems odd. I would expect any decently made component to expect an enum not a text command that is SO EASILY fouled up.
I would expect something more like
myCD.Command = COMMANDS.PLAY
Its possible the component has no idea what the commands you're sending it mean, but is absorbing the error rather than crashing: The right thing it should do.
Its possible you didn't set the drive letter for the component.
100 other things are possible - but from this there's little we can tell you.
We have no idea what the object "myCD" is. All we see is that you are sending it text commands, which itself seems odd. I would expect any decently made component to expect an enum not a text command that is SO EASILY fouled up.
I would expect something more like
myCD.Command = COMMANDS.PLAY
Its possible the component has no idea what the commands you're sending it mean, but is absorbing the error rather than crashing: The right thing it should do.
Its possible you didn't set the drive letter for the component.
100 other things are possible - but from this there's little we can tell you.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|