我已经在C#中构建了一个应用程序,并且还为此应用程序构建了一个安装程序。在安装程序上的应用程序适用于所有Windows 7机器,但似乎不适用于任何XP机器。C#应用程序在Win 7上工作但不在XP上
我将简要描述我的应用程序的功能。
应用程序在启动时播放swf文件。 swf文件具有3个具有独立功能的按钮。 基本上,点击这些按钮,它必须显示从sqlite加载的某些图像。
问题是,应用程序正确加载swf,swf完全播放直到结束,然后在我已经放置3个按钮的点击事件不响应任何按钮的末尾。 我猜测这是FSCommand的问题和dll文件没有得到正确
注册,我已经加入到我的设置中的DLL是
- AxInterop.ShockwaveFlashObjects.dll
- Interop.shockwaveFlashObjects。 DLL
- System.Data.SQLite.dll
- KP-ImageViewerV2.dll(从codeproject.com)
另外,根据本文件是我的清单文件和.config文件
我试图注册手动我的Dll使用RegSrv32 C:\ Interop.ShockwaveFlashObject.dll 并且还C:\ AxInterop.ShockwaveFlashObject.dll 错误我得到的是
The (DllPath and Name Here) was loaded but DllRegisterServer entry point was not found.
,我使用,以显示我的swf文件的代码如下
private void axShockwaveFlash1_FSCommand(object sender,AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
{
string btn = e.command.ToString();
if (btn == "play")
{
try
{
frmMain Main = new frmMain();
Main.Show();
this.Hide();
}
catch (Exception ex)
{ MessageBox.Show(ex.ToString()); }
}
if (btn == "syllabus")
{
SQLiteConnectionStringBuilder strbldr = new SQLiteConnectionStringBuilder();
strbldr.DataSource = @Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\TVC E-Excust Customs\\E-ExcustCustoms.s3db";
SQLiteConnection con = new SQLiteConnection(strbldr.ConnectionString);
con.Open();
Syllabus_usageInformation syl = new Syllabus_usageInformation(this);
SQLiteCommand cmd = new SQLiteCommand("SELECT ImageFiles FROM misc WHERE Name='Syllabus new'", con);
SQLiteDataReader reader = cmd.ExecuteReader();
byte[] imageBytes = null;
while (reader.Read())
{
imageBytes = (System.Byte[])reader["ImageFiles"];
}
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);
con.Close();
syl.kpImageViewer1.OpenButton = false;
syl.kpImageViewer1.Image = (Bitmap)Image.FromStream(ms,true);
syl.kpImageViewer1.Zoom = 85;
syl.Show();
this.Hide();
}
if (btn == "usageInformation")
{
SQLiteConnectionStringBuilder strbldr = new SQLiteConnectionStringBuilder();
strbldr.DataSource = @Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\TVC E-Excust Customs\\E-ExcustCustoms.s3db";
SQLiteConnection con = new SQLiteConnection(strbldr.ConnectionString);
con.Open();
Syllabus_usageInformation syl = new Syllabus_usageInformation(this);
SQLiteCommand cmd = new SQLiteCommand("SELECT ImageFiles FROM misc WHERE Name='UsageInformation'", con);
SQLiteDataReader reader = cmd.ExecuteReader();
byte[] imageBytes = null;
while (reader.Read())
{
imageBytes = (System.Byte[])reader["ImageFiles"];
}
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);
con.Close();
syl.kpImageViewer1.OpenButton = false;
syl.kpImageViewer1.Image = (Bitmap)Image.FromStream(ms, true);
syl.kpImageViewer1.Zoom = 82;
syl.Show();
this.Hide();
}
}
我的swf文件有三个按钮为ABO提到五个。这些按钮位于影片剪辑中,我将粘贴AS代码 以下是其中一个按钮发生的情况。剩下的2个与这个只更改值相同。 我对闪光很新,但可能会出现这个问题,因为所使用的AS版本或运行此swf所需的最低版本的闪存。只是再次提到视频播放,但按钮是无法在XP响应,但在7?
on (rollOver)
{
if (_root.link != page)
{
this.gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut)
{
if (_root.link != page)
{
this.gotoAndPlay("s2");
}
}
on (press)
{
fscommand("syllabus","syll");
}
如果有人需要更多的解释或更多的代码或只是整个项目让我知道会发送该项目。 我在这里解决方案,所以任何帮助将不胜感激。
您是否阅读过文档以查看所有提及的库是否与Windows XP兼容? –
您是否在两个系统中使用相同的.NET Framework版本? – atzu
请确保版本。网络框架是相同的两台机器 – Prasanth