带有Flash文件的屏幕保护程序
问题描述:
嘿,
我创建了一个包含Flash文件的屏幕保护程序.在Windows XP中,一切正常,但我也已经在Win 7上测试了我的应用程序,并且收到此错误消息:
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:
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();
我认为这是因为Windows 7中缺少一个库,或带有osxstate的库.这是我的第一个可与Flash配合使用的应用程序.
安德烈
[edit]添加了代码块-OriginalGriff [/edit]
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]
答
这听起来像是一个愚蠢的问题,但是您的win 7机器上是否装有闪存. .
This may sound like a stupid question, but do you have flash loaded on your win 7 machine...
:) 哇,您在Win 7机器上是正确的,它并没有真正安装,只是在歌剧上安装了,所以它没有用:)
现在我知道为什么它不起作用了:D
谢谢
安德烈(Andre)
:) 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