1 Replies - 628 Views - Last Post: 15 November 2012 - 07:54 AM Rate Topic: -----

#1 sharonbabyk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-November 12

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.
[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]




Is This A Good Question/Topic? 0
  • +

Replies To: How to insert a multimedia control in VB6 applications

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5432
  • View blog
  • Posts: 11,643
  • Joined: 02-June 10

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1