1. 添加皮肤
skinEngine1.SkinFile = "MSN.ssk";
Visual Studio 2005工具箱上右击选择“选择项”,慢慢等...
在弹出的“选择工具箱项”选项卡中,点击“浏览”,找到IrisSkin2.dll存放的位置,双击,
你会发现多了个“SkinEngine”,确定。
将公共控件里的“SkinEngine”,拖到窗体上,将皮肤文件*.skk在“解决方案资源管理器”中
添加到bin文件夹下的Debug文件夹下。
在定义窗体时加上一句:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.skinEngine1.SkinFile = "*.ssk";
}
}
//ToolTip的使用
ToolTip toolTip2 = new ToolTip();
if ((e.KeyChar >= 48 && e.KeyChar <= 57) || e.KeyChar == 8)
{
}
else
{
e.Handled = true;
toolTip2.Show("只能输入数字", 结转金额TextBox, 2000);
}
if (结转金额TextBox.Text.Length >7 && e.KeyChar != 8)
{
e.Handled = true;
}
//清空表
if (checkBox1.Checked)
{
try
{
DBHelper.con.Open();
string str = "delete from buy ";
SqlCommand cmd = new SqlCommand(str, DBHelper.con);
int result = cmd.ExecuteNonQuery();
if (result > 0)
{
MessageBox.Show("清空成功!!");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
DBHelper.con.Close();
}
}