加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

winForm显示Flash

发布时间:2020-12-15 18:28:05 所属栏目:百科 来源:网络整理
导读:Winform 中显示Flash并不象Web中显示那么简单,开发时还是要注意的。以下为最基本的步骤: ? 1.工具箱中,添加Com组件ShockwaveFlash ?? C:/WINDOWS/system32/Macromed/Flash/Flash10c.ocx ?? Regsvr32 C:/WINDOWS/system32/Macromed/Flash/Flash10c.ocx ? ?
Winform 中显示Flash并不象Web中显示那么简单,开发时还是要注意的。以下为最基本的步骤:

?

1.工具箱中,添加Com组件ShockwaveFlash
?? C:/WINDOWS/system32/Macromed/Flash/Flash10c.ocx

?? Regsvr32 C:/WINDOWS/system32/Macromed/Flash/Flash10c.ocx

?

?

2.regsvr32.exe c:/windows/system32/mci32.ocx

?

?? 下载地址:http://www.xdowns.com/go/119.asp?url=uploadFile/2008-3/MCI32.rar

??

3.清理解决方案,重新生成,直至引用的AxShockwaveFlashObjects的叹号消失

4.添加控件axShockwaveFlash1,并显示Flash
? flashBox.Movie = Application.StartupPath + "//flash//jinyu.swf";

5.实现右键全屏
? (1)添加contextMenuStrip1
? (2)全屏和取消全屏
??????? private void fullScreenToolStripMenuItem_MouseDown(object sender,MouseEventArgs e)
??????? {
??????????? this.TopMost = true;
??????????? this.FormBorderStyle = FormBorderStyle.None;
??????????? this.WindowState = FormWindowState.Maximized;

??????????? flashBox.Width = Screen.PrimaryScreen.Bounds.Width;
??????????? flashBox.Height = Screen.PrimaryScreen.Bounds.Height;
????????????
??????? }

??????? private void CancelSceenToolStripMenuItem_MouseDown(object sender,MouseEventArgs e)
??????? {
??????????? this.TopMost = false;
??????????? this.FormBorderStyle = FormBorderStyle.Sizable;
??????????? this.WindowState = FormWindowState.Normal;

??????????? flashBox.Width = this.Width; ??????????? flashBox.Height = this.Height; ??????? } ?? (3)在axShockwaveFlash1的属性contextMenuStrip设置contextMenuStrip1值

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读