Question Help with the Windows Media Player Component.

Christopherx

Well-known member
Joined
Jul 4, 2010
Messages
58
Programming Experience
Beginner
So I've written a programme that will function as an alarm clock:

VB.NET:
Public Class Form1
    Dim time As Date
    Dim path As String


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim temp As String
        temp = NumericUpDown1.Value.ToString + ":" + NumericUpDown2.Value.ToString + " " + ComboBox1.SelectedItem.ToString
        Me.Text = "Alarm Set for " & temp

        time = temp
        Timer1.Start()


    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AxWindowsMediaPlayer1.Visible = False
        Me.Text = "Alarm Clock Chris Cooney(c)"

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If time = TimeOfDay Then
            AxWindowsMediaPlayer1.URL = path


        End If

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        AxWindowsMediaPlayer1.Ctlcontrols.stop()
        MsgBox("Dont Rage", , Title:="Lol")

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        OpenFileDialog1.ShowDialog()
        path = OpenFileDialog1.FileName

    End Sub
End Class
I then created a shortcut for it, and moved it onto my desktop. I do have an issue though. You see, when it goes to play it I get an error message telling me its having an exception processing some wild stuff, and then that will pop up about 8 times. When I begin button bashing, it goes away and the programme plays the song. However, whats sucky is that when im asleep, I shall not be clicking, and thus need help! Anyone got any suggestions ?
 
Last edited by a moderator:
Exception Processing Message 0xc000007b Parameters 0x7631023C 0x7631923c 0x7631923c and the title bar says "Windows - Bad Image". The msgbox style is critical.
 
People will help you if they can. If they can't they won't. One of the hazards of working with COM components is that the error messages tend to be less helpful. Before I knew what the error message was I thought that there might be a chance I could help. Now that I've seen the message I know that I can't. I've never really worked with WMP before but there may be others who have. Making pointless posts that contain nothing but general criticism of everyone for not helping is not the way to get them to help in the future.
 
"Windows - Bad Image" - suggests a problem at operating system level, ie in your case something in relation to the WMP libraries (and not images/pictures :)). I've never seen or heard about it before. Did a search and some posts indicate this also could be caused (among several weird theories) by some encoded videos, but still a WMP product related issue.
 
Back
Top