在 C# WinForms 应用程序中显示 Flash 内容 [英] Displaying Flash content in a C# WinForms application

查看:45
本文介绍了在 C# WinForms 应用程序中显示 Flash 内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C# WinForms 应用程序中显示 Flash 内容的最佳方式是什么?我想创建一个能够显示图像和 Flash 内容的用户控件(类似于当前的 PictureBox).

What is the best way to display Flash content in a C# WinForms application? I would like to create a user control (similar to the current PictureBox) that will be able to display images and flash content.

能够从各种而不是磁盘上的文件加载闪存内容会很棒.

It would be great to be able to load the flash content from a stream of sorts rather than a file on disk.

推荐答案

虽然我自己没有在 Windows 窗体应用程序中使用过 Flash 对象,但我知道这是可能的.在工具箱上的 Visual Studio 中,选择添加新组件.然后在出现的新窗口中选择 COM 组件" 选项卡以获取一个列表,您可以在其中找到 Shockwave Flash Object"

While I haven't used a flash object inside a windows form application myself, I do know that it's possible. In Visual studio on your toolbox, choose to add a new component. Then in the new window that appears choose the "COM Components" tab to get a list in which you can find the "Shockwave Flash Object"

添加到工具箱后,只需像使用 Visual Studio 中的任何其他标准"控件一样使用该控件.

Once added to the toolbox, simply use the control as you would use any other "standard" control from visual studio.

三个简单的命令可用于与控件交互:

three simple commands are available to interact with the control:

  • AxShockwaveFlash1.Stop()
  • AxShockwaveFlash1.Movie = FilePath &"文件名.swf"
  • AxShockwaveFlash1.Play()

我认为这些都是不言自明的.

which, I think, are all self explanatory.

如果能够加载就好了来自流的 flash 内容排序而不是磁盘上的文件.

It would be great to be able to load the flash content from a stream of sorts rather than a file on disk.

我刚刚看到您也在寻找一种从流中加载内容的方法,因为我不确定冲击波闪光物体是否可行,所以我会给你另一个选择(实际上有两个).

I just saw you are also looking for a means to load the content from a stream, and because I'm not really sure that is possible with the shockwave flash object I will give you another option (two actually).

第一个是我建议您仅在必要时使用的,因为它使用完整的webbrowser 组件"(也可作为额外的工具箱项目),这就像试图用火箭筒射一只苍蝇.当然它会起作用,因为该控件将充当一个真正的浏览器窗口(实际上是 Internet Explorer 浏览器),但实际上并不意味着按照您需要的方式使用它.

the first is the one I would advise you to use only when necessary, as it uses the full blown "webbrowser component" (also available as an extra toolbox item), which is like trying to shoot a fly with a bazooka. of course it will work, as the control will act as a real browser window (actually the internet explorer browser), but its not really meant to be used in the way you need it.

第二个选项是使用我在寻找有关在 Windows 窗体中播放 Flash 内容的更多信息时刚刚发现的内容.F-IN-BOX 是一种商业解决方案,它也可以播放来自给定的网站 URL.(所提供的链接会将您定向到您必须使用的 .NET 代码).

the second option is to use something I just discovered while looking for more information about playing flash content inside a windows form. F-IN-BOX is a commercial solution that will also play content from a given website URL. (The link provided will direct you to the .NET code you have to use).

这篇关于在 C# WinForms 应用程序中显示 Flash 内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆