C#小结
/*1*/
/*************************************/
//实现无标题可拖动窗体
/*************************************/
protected override void WndProc(ref Message m)//重写Wndproc实现无标题可拖动窗口 {
if (m.Msg == 0x0201) //鼠标左键按下去的消息
{
m.Msg = 0x00A1; //更改消息为非客户区按下鼠标
m.LParam = IntPtr.Zero; //默认值
m.WParam = new IntPtr(2); //鼠标放在标题栏内
}
base.WndProc(ref m);
}
/*2*/
this.TransparencyKey = this.BackColor;//对窗体背景色透明
/*3*/
//字体对话框
if (fontDialog1.ShowDialog() == DialogResult.OK)
{
textBox1.Font = fontDialog1.Font;
}
/*4*/
//动态生成控件以及控件对应的事件
ToolStripDropDownItem ts
((ToolStripDropDownItem)contextMenuStrip1.Items["openToolStripMenuItem"]); ToolStripDropDownItem ts1 = new ToolStripMenuItem(reads);
ts.DropDownItems.Add(ts1);
ts1.Click += new EventHandler(ts_Click);
/*5*/
//对动态生成的控件事件的处理
private void ts_Click(object sender, EventArgs e)
{
//ToolStripDropDownItem tool = (ToolStripDropDownItem)sender;
ToolStripDropDownItem tool = sender as ToolStripDropDownItem;
string txtname = "";
txtname = "txt\\" + tool.Text.Replace(":", ",")+".txt";
=
C#小结_计算机软件及应用_IT/计算机_专业资料。学习初级C#的一点小总结C#...Format(格式化): 字符 说明 示例 输出结果 C 货币格式 String.Format("{0,20...
c语言学习小结 20页 免费 学习c语言程序设计心得 暂无评价 7页 1下载券 学期小结--C语言学习心得... 暂无评价 2页 免费 C语言学习心得 3页 1下载券喜欢...
C程序设计小结 67页 1财富值 C语言小结 9页 免费 C语言小结 18页 10财富值 C语言小结 16页 免费 c语言笔试小结 5页 5财富值 C语言精华小结 9页 2财富值...
C程序设计小结 67页 1财富值 C语言小结 9页 免费 C语言小结 18页 10财富值 C语言小结 16页 免费 c语言笔试小结 5页 5财富值 C语言精华小结 9页 2财富值...
c#小结_计算机软件及应用_IT/计算机_专业资料。1. c#设置xml内容不换行 2. 为什么...("c:\\x.xml")); var im = from i in s where i.number == 1 ...
C#知识点小结_工学_高等教育_教育专区。1.维护数据库的完整性、一致性、你喜欢...* 答:委托本质上是一种“方法接口”,它相当于 C/C++中的函数指针,当然它比...
C#集合类总结 暂无评价0人阅读0次下载举报文档 集合详细的介绍!总结C# 集合类 总结 C#集合类:Array ...
C#实训个人小结 暂无评价0人阅读0次下载举报文档经过4 个礼拜的实训, 让我受益匪浅, 给我收获最大的是我觉得很多工作需要我...
C#小结 8页 免费 常用SQL语句格式积累 暂无评价 13页 免费C#总结 暂无评价0人阅读0次下载举报文档 C#总结,包含C...
热门文档