如何在WPF项目本身中设置swf路径? [英] How to set swf path in WPF project itself?

查看:94
本文介绍了如何在WPF项目本身中设置swf路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

Hi friends,

WindowsFormsHost host1 = new WindowsFormsHost();
FormFlashLibrary.FlashAxControl player1 = new FormFlashLibrary.FlashAxControl();

host1.Child = player1;

stkpan1.Children.Add(host1);
                    
player1.Width = 1010;
player1.Height = 302;

player1.LoadMovie(@"E:\sub files\flashes\main_animation.swf");
player1.Play();


现在,我正在使用WPF进行项目.这个C#代码可以正常工作,但是Flash文件是从系统中获取的,例如E:\ flash \ flash.swf.但是,我希望swf文件在项目中.所以,我修改了
这样的代码


Now, I am using WPF for project. This C# code is perfectly working, but the flash file is taken from the system like E:\flash\flash.swf. But, I want the swf file to be in project. So, I modified the code like

player1.LoadMovie("main_animation.swf"); 


现在,瑞士法郎不起作用,如何在自己的项目中运行该瑞士法郎?


Now the swf is not working, how can I run this swf in project it self?

help me!

推荐答案

看起来像路径问题.确保swf文件的相对路径正确形成并在您的LoadMovie方法中提供.
Looks like a path issue. Make sure that the relative path of the swf file is correctly formed and supplied to in your LoadMovie method.


这篇关于如何在WPF项目本身中设置swf路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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