Results 1 to 5 of 5

Thread: [RESOLVED] My program have a exception !!! please?!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    96

    Resolved [RESOLVED] My program have a exception !!! please?!

    Hello everyone,
    I have a big problem with my program. Indeed, after put images, I have this type of message after:
    System.Windows.Forms.AxHost + InvalidActiveXStateException
    More details
    Code:
    See the end of this message for more details on the debug call
    just-in-time (JIT) instead of this dialog box.
    
    ************** Exception text **************
    Can not call set property of 'URL' currently.
    
    
    ************** Assemblies loaded **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3131.0 built by: NET472REL1LAST
        CodeBase: file: /// C: /Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    Danzey legendary tournament 2
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file: /// C: /Users/DANIEL/Documents/DANZEY%20LEGENDARY%20TOURNAMENT/Danzey%20legendary%20tournament%202.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 10.0.0.0
        Win32 Version: 14.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3110.0 built by: NET472REL1LAST_C
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    AxInterop.WMPLib
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file: /// C: /Users/DANIEL/Documents/DANZEY%20LEGENDARY%20TOURNAMENT/AxInterop.WMPLib.DLL
    ----------------------------------------
    Interop.WMPLib
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file: /// C: /Users/DANIEL/Documents/DANZEY%20LEGENDARY%20TOURNAMENT/Interop.WMPLib.DLL
    ----------------------------------------
    mscorlib.resources
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_en_b77a5c561934e089/mscorlib.resources.dll
    ----------------------------------------
    System.Windows.Forms.resources
        Assembly Version: 4.0.0.0
        Win32 Version: 4.7.3056.0 built by: NET472REL1
        CodeBase: file: /// C: /WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_en_b77a5c561934e089/System.Windows.Forms.resources.dll
    ----------------------------------------
    
    ************** Debug JIT **************
    To enable just-in-time (JIT) debugging, the configuration file for this
    application or this computer (machine.config) should have value
    jitDebugging defined in the system.windows.forms section.
    The application must also be compiled with debugging
    activated.
    
    For example :
    
    <Configuration>
        <system.windows.forms jitDebugging = "true" />
    </ Configuration>
    can you help me solve this problem?What i must check? thank you in advance for your answer!
    Last edited by danzey; Aug 4th, 2018 at 08:41 AM. Reason: RESOLVED

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,757

    Re: [HELP] My program have a exception !!! please?!

    How is the activeX control created? Is it added to a form in the designed or is it create dynamically at run time?

    Show some of your code where the exception is raised.
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    96

    Re: [HELP] My program have a exception !!! please?!

    Quote Originally Posted by kebo View Post
    How is the activeX control created? Is it added to a form in the designed or is it create dynamically at run time?

    Show some of your code where the exception is raised.
    thank you for your help!
    it think it create dynamically at run time
    here is the code
    Code:
    Imports System.Linq
    
    Public Class Form1
    
    
        Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
    
    
    
    
            'combox17 = choix niveau tournoi
            Dim myfilea22222 As String = (Application.StartupPath & "\DANfiles\life.txt")
    
            'Check if file exists
            If System.IO.File.Exists(myfilea22222) = True Then
                Kill(Application.StartupPath & "\DANfiles\life.txt")
            End If
    
    
    
    
            CheckBox9.Enabled = False
            CheckBox10.Enabled = False
            CheckBox11.Enabled = False
            CheckBox12.Enabled = False
            CheckBox13.Enabled = False
            CheckBox14.Enabled = False
             Me.AxWindowsMediaPlayer1.URL = Application.StartupPath & "\DANfiles\musicarena.mp3" ' music intro
            Me.AxWindowsMediaPlayer1.settings.setMode("loop", True)
            Me.AxWindowsMediaPlayer3.URL = Application.StartupPath & "\movies\alpha1.mp4"
            Me.AxWindowsMediaPlayer3.settings.setMode("Loop", False)
            Me.AxWindowsMediaPlayer3.Ctlcontrols.play()
            AxWindowsMediaPlayer3.Show()
    
            'Me.BackgroundImage = Image.FromFile(Application.StartupPath & "\DANfiles\back1.png") ' non! mettre une image gif picturebox49
            Me.BackColor = Color.Black
            'Initialize the random number generator
    
            Randomize()
            'faire le fond pour les champion
            'Random whole number between 1 and 4 :
            Dim random_number As Integer = CInt(Int((7 * Rnd()) + 1)) 'Int(4 * Rnd()) + 1
            'If random_number <= 2 Then
            'PictureBox49.Image = My.Resources.denzeygre
            'Me.BackgroundImage = My.Resources.denzeygre
            'End If
            'If random_number = 3 Then
            'PictureBox49.Image = My.Resources.denzy0001
            'Me.BackgroundImage = My.Resources.denzy0001
            ' End If
            ' If random_number = 4 Then
            'PictureBox49.Image = My.Resources.dan01
            'Me.BackgroundImage = My.Resources.dan01
            ' End If
            'If random_number >= 5 Then
            'PictureBox49.Image = My.Resources.newdas0000
            'Me.BackgroundImage = My.Resources.newdas0000
            ' End If
            'choix des qualifié txt
            If random_number >= 7 Then
                PictureBox57.Image = My.Resources.NEBULA0000
                PictureBox58.Image = My.Resources.NEBULA0000
                PictureBox59.Image = My.Resources.NEBULA0000
                PictureBox60.Image = My.Resources.NEBULA0000
                PictureBox61.Image = My.Resources.NEBULA0000
                PictureBox62.Image = My.Resources.NEBULA0000
                PictureBox63.Image = My.Resources.NEBULA0000
                PictureBox64.Image = My.Resources.NEBULA0000
            End If
            'choix des qualifiéd txt
            If random_number <= 3 Then
                PictureBox57.Image = My.Resources.qualified115503
                PictureBox58.Image = My.Resources.qualified115503
                PictureBox59.Image = My.Resources.qualified115503
                PictureBox60.Image = My.Resources.qualified115503
                PictureBox61.Image = My.Resources.qualified115503
                PictureBox62.Image = My.Resources.qualified115503
                PictureBox63.Image = My.Resources.qualified115503
                PictureBox64.Image = My.Resources.qualified115503
            End If
    
            'choix des qualifiéd 2 choix txt
            If random_number >= 4 And random_number <= 6 Then
                PictureBox57.Image = My.Resources.QUALF1
                PictureBox58.Image = My.Resources.QUALF1
                PictureBox59.Image = My.Resources.QUALF1
                PictureBox60.Image = My.Resources.QUALF1
                PictureBox61.Image = My.Resources.QUALF1
                PictureBox62.Image = My.Resources.QUALF1
                PictureBox63.Image = My.Resources.QUALF1
                PictureBox64.Image = My.Resources.QUALF1
            End If
    
    
    
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then '" & Me.ComboBox1.Text & ".png") = True Then
                PictureBox35.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png")
    
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then
    
                PictureBox34.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png")
            End If
    
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '3.Text & ".png") = True Then
    
    
                PictureBox32.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '3.Text & ".png")
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '4.Text & ".png") = True Then
    
                PictureBox36.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '4.Text & ".png")
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '5.Text & ".png") = True Then
    
                PictureBox39.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '5.Text & ".png")
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '6.Text & ".png") = True Then
    
                PictureBox38.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '6.Text & ".png")
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '7.Text & ".png") = True Then
    
    
                PictureBox37.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '7.Text & ".png")
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '8.Text & ".png") = True Then
    
    
                PictureBox33.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '8.Text & ".png")
            End If
    
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '2.Text & ".png") = True Then
    
                PictureBox34.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '2.Text & ".png")
            End If
    
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '3.Text & ".png") = True Then
    
    
                PictureBox32.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '3.Text & ".png")
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '4.Text & ".png") = True Then
    
                PictureBox36.Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") '4.Text & ".png")
            End If
            If System.IO.File.Exists(Application.StartupPath & "\DANfiles\challengersgif\fighters.png") = True Then  '5.Text & ".png") = True Then
    it arrives when i open the form.

    thank you

  4. #4
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,757

    Re: [HELP] My program have a exception !!! please?!

    Given the name of the control, I would bet you have created it at design time by dragging it from the Visual Studio toolbox onto your form. If you had created it at run time, you would have written this line of code somewhere...
    Code:
    AxWindowsMediaPlayer1 = New AxWindowsMediaPlayer
    A quick Google found this SO thread. Maybe it will help.
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    96

    Question Re: [HELP] My program have a exception !!! please?!

    Quote Originally Posted by kebo View Post
    Given the name of the control, I would bet you have created it at design time by dragging it from the Visual Studio toolbox onto your form. If you had created it at run time, you would have written this line of code somewhere...
    Code:
    AxWindowsMediaPlayer1 = New AxWindowsMediaPlayer
    A quick Google found this SO thread. Maybe it will help.

    YES!! thanks to you I found the error!
    A windowsmediaplayer item is not found (invisible in form1.conception) , so what i do? do i erase the code in form1.designer or must i replace by an other windowsmediaplayer item?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width