主窗体代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Sunisoft.IrisSkin;namespace xr
{
public partial class Form1 : Form
{
SkinEngine skinEngine1 = null;
public Form1()
{
skinEngine1 = new SkinEngine();
skinEngine1.SkinAllForm = true;
InitializeComponent(); //this.skinEngine1.SkinFile = "DiamondGreen.ssk";
} private void 流量ToolStripMenuItem1_Click(object sender, EventArgs e)
{ } private void 流量阻力损失ToolStripMenuItem_Click(object sender, EventArgs e)
{
//子窗体
LZ fm = new LZ();
fm.MdiParent = this;
fm.Show();
} private void wg1_Click(object sender, EventArgs e)
{
if (!wg1.Checked)
{
wg1.Checked = true;
wg2.Checked = false;
}
Form1_Load(sender, e);
} private void wg2_Click(object sender, EventArgs e)
{
if (!wg2.Checked)
{
wg2.Checked = true;
wg1.Checked = false;
}
Form1_Load(sender, e);
} private void Form1_Load(object sender, EventArgs e)
{
try
{
string style = "";
if (wg1.Checked)
{
style = "DiamondBlue.ssk";
}
else
{
style = "DiamondGreen.ssk";
}
skinEngine1.SkinFile = style;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}运行时
namespace xr
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());此处提示创建窗口句柄出错
}
}
}但是把绿色的去掉,就可以运行。
小弟是新手不大懂。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Sunisoft.IrisSkin;namespace xr
{
public partial class Form1 : Form
{
SkinEngine skinEngine1 = null;
public Form1()
{
skinEngine1 = new SkinEngine();
skinEngine1.SkinAllForm = true;
InitializeComponent(); //this.skinEngine1.SkinFile = "DiamondGreen.ssk";
} private void 流量ToolStripMenuItem1_Click(object sender, EventArgs e)
{ } private void 流量阻力损失ToolStripMenuItem_Click(object sender, EventArgs e)
{
//子窗体
LZ fm = new LZ();
fm.MdiParent = this;
fm.Show();
} private void wg1_Click(object sender, EventArgs e)
{
if (!wg1.Checked)
{
wg1.Checked = true;
wg2.Checked = false;
}
Form1_Load(sender, e);
} private void wg2_Click(object sender, EventArgs e)
{
if (!wg2.Checked)
{
wg2.Checked = true;
wg1.Checked = false;
}
Form1_Load(sender, e);
} private void Form1_Load(object sender, EventArgs e)
{
try
{
string style = "";
if (wg1.Checked)
{
style = "DiamondBlue.ssk";
}
else
{
style = "DiamondGreen.ssk";
}
skinEngine1.SkinFile = style;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}运行时
namespace xr
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());此处提示创建窗口句柄出错
}
}
}但是把绿色的去掉,就可以运行。
小弟是新手不大懂。
解决方案 »
- Intel Hex文件读写,高手们请进
- 有没有使用过Dblinq这个开源的东西?
- C#调用oracl存储过程 出现的异常 请教 ~~
- datagridview 如何绑定数据集设计器中的TableAdapter
- XmlElement itemElement = (XmlElement)itemNode中的括号是什么意思?
- *******哪位帮我解决一个很简单的问题**************
- 请教高人:如何处理这样的文本
- ???关于mdi菜单问题!!!!大家救命啊
- 关于DataGrid的问题
- c#快速读写double类型的数组
- C# 资源文件,不同窗体引用,会产生多个相同资源?
- 如何对web服务进行单元测试
skinEngine1.SkinAllForm = true;