Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hey,
I have created a screen saver which includes a flash file. In Windows XP all works fine but I also have test my application on Win 7 and I get this error message:

System.Runtime.InteropServices.COMException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))


I get the error on this line:
Controls.Add(AxShockwaveFlash2);


Here is my complete code:
C#
AxShockwaveFlash2 = new AxShockwaveFlashObjects.AxShockwaveFlash();
this.Show();
Controls.Add(AxShockwaveFlash2);
AxShockwaveFlash2.Enabled = true;
AxShockwaveFlash2.Location = new System.Drawing.Point(0, 0);
AxShockwaveFlash2.Name = "AxShockwaveFlash2";
AxShockwaveFlash2.OcxState = ((System.Windows.Forms.AxHost.State)(resourceManager.GetObject("AxShockwaveFlash2.OcxState")));
AxShockwaveFlash2.Size = new System.Drawing.Size(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height);
AxShockwaveFlash2.Movie = Application.StartupPath + "\\test.swf?back="+back+"&light="+light+"&filter="+filter+"&szenerie="+szen+"&fcount="+fcount;
AxShockwaveFlash2.Play();



I think its because a missing library in Windows 7 or its something with the osxstate. Its my first application which works with flash.


Andre

[edit]Code blocks added - OriginalGriff[/edit]
Posted
Updated 21-Mar-11 9:27am
v2

This may sound like a stupid question, but do you have flash loaded on your win 7 machine...
 
Share this answer
 
Comments
charles henington 21-Mar-11 20:19pm    
once again Griff another 5 Had same problem loading flash swf file in embeded browser in winform on wife's win7 no flash installed was indeed the culprit
:) Wow you are right on the Win 7 machine it wasn´t really installed it just wa installed on opera and so it havent work :)
Now I know why it doesnt work :D

Thanks
Andre
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900