Results 1 to 4 of 4

Thread: dispose object/ create object?

  1. #1

    Thread Starter
    Fanatic Member Navarone's Avatar
    Join Date
    Jun 2003
    Location
    Akron, Ohio USA
    Posts
    740

    dispose object/ create object?

    If you dispose of an object on a button click can you also create the object on a button click?

    axShockwaveFlash1.dispose

    How would I create the flash object again?
    He who never made a mistake never made a discovery?

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    Toronto, ON
    Posts
    1,093

    Re: dispose object/ create object?

    axShockwaveFlash1 = new <Object Name>

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: dispose object/ create object?

    This begs the question, if you want to use an object of that type then why are you disposing one that you already have? To dispose an Image in a PictureBox becuase you're displaying a different one is one thing, but what can this new object do that the existing one can't? In the case of an ActiveX Shockwave player you would simply change the path to the animation it was displaying wouldn't you?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Fanatic Member Navarone's Avatar
    Join Date
    Jun 2003
    Location
    Akron, Ohio USA
    Posts
    740

    Re: dispose object/ create object?

    Well one reason I can think of is you can't reload a shockwave component. My shockwave component plays the same swf, but that swf is playing different movies depending on a user selection. Initially the component plays fine but if a new selection is made and a new movie is choosen the swf doesnt update. It will only play the new selection if you restart the application.

    So I thought, if I remove the component and make it again it would always play the new selection. Maybe there is another way.

    See my other thread related to this object http://www.vbforums.com/showthread.php?t=408731
    He who never made a mistake never made a discovery?

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