I'm having a problem with "corrupt .resource" files.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xXPureXx
    New Member
    • Nov 2010
    • 1

    #1

    I'm having a problem with "corrupt .resource" files.

    The error code is as follows: "An error occurred creating the form. See Exception.Inner Exception for details. The error is: Corrupt .resources file. Got an unexpected EndOfStreamExce ption while trying to read the ResourceReader header." I've tried removing them and re-adding them and re-converting the files to Wav (I'm making a game that involves music, and I'm using the my.computer.aud io.play function to play them), and that doesn't work. It stops working only after I've added 8+ songs. Here is the code I use to preview the song on a different form after the user clicks a label with the song's name on it:

    Code:
      Private Sub LabelX11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LabelX11.Click
            Aboutsong.AlbumImage.Image = My.Resources.NightmareRevisited
            Aboutsong.TextBox1.Text = "Etc."        Aboutsong.TextBox2.Text = "Etc."
            Aboutsong.Show()
            My.Computer.Audio.Play(My.Resources.Kidnap_The_Sandy_Claws_1_, AudioPlayMode.BackgroundLoop)
            Aboutsong.TextBox1.Name = "Inferno"
            Me.Close()
        End Sub
    The About song's Textbox1 is renamed to the name of the form that the label that was clicked was on, so when you close it, it goes back to that level instead of the level-select menu:
    Code:
      Private Sub Close1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Close1.Click
            Close1.Image = My.Resources.Close_Clicked
            My.Computer.Audio.Stop()
            If TextBox1.Name = "Azucar" Then
                TheAzucar.Show()
            ElseIf TextBox1.Name = "Inferno" Then
                The_Inferno.Show()
            End If
            Me.Close()
        End Sub
    I would greatly appreciate help with this problem. Thank you.
Working...