Question Detecting whether Flash ActiveX is installed on startup

StuartBruce

New member
Joined
Oct 9, 2012
Messages
2
Programming Experience
1-3
Hello

I've got a VB.Net app (Studio 2008) to which I've just added a reference to the Shockwave Flash ActiveX, so that I can show a Flash movie on a form.

On PC's which don't have the Flash ActiveX installed, this means my compiled app now crashes out before it can run, presumably as the reference is not found.

What I need to do is somehow detect, when my app is initialising, whether the Flash ActiveX is present, to set that fact to a boolean variable, and for the program to continue running either way. (So if it's running on a PC without Flash, the Flash object is simply not displayed but otherwise the program runs as normal.)

It's important that Ican't install Flash on all the target PC's and don't want to- so the solution I need must cope with Flash not being installed, rather than insist on its installation.

How would I go about setting this up? Any suggestions or pointers would be very welcome.

Thanks

Stuart
 
Is the Flash control used on your startup form? If not, does the startup form display successfully? If it currently is on the startup form, test with a different startup form to see if that will display.
 
Is the Flash control used on your startup form? If not, does the startup form display successfully? If it currently is on the startup form, test with a different startup form to see if that will display.

Thanks for the prompt response. I've got it worked fine now- here's how, in case it helps anyone else.

My code is based on one main startup form, and sure enough like you suggest, taking the ActiveX control out of the startup made it run fine on a PC without Flash.

I am then able to create the AxShockwaveFlash1 object the first time the Flash movie is required, having moved the item creation code out of the designer. This also means I can test for Flash installation first, the code can behave differently on PCs without Flash installed, and I can catch errors nicely.

Thanks very much for your help.
 
Back
Top