摘要: //定义哈希表 private Hashtable ht = new Hashtable(); private void Form1_Load(object sender, EventArgs e) { StreamReader sr = null; try { //参数一:路径,参数二:编码格式 sr = new StreamReader(@"C:\Users\Administrator\Desktop\user... 阅读全文
posted @ 2012-03-24 22:01 ghypnus 阅读(296) 评论(0) 推荐(0) 编辑
摘要: DataGridViewTextBoxColumn dc = new DataGridViewTextBoxColumn();dc.HeaderText = "新增列";dataGridView1.Columns.Add(dc); 阅读全文
posted @ 2012-03-24 15:48 ghypnus 阅读(317) 评论(0) 推荐(0) 编辑
摘要: private void Form1_Load(object sender, EventArgs e) { //指定托盘图标 this.notifyIcon1.Icon = new System.Drawing.Icon("C:\\Users\\Administrator\\Desktop\\11.ico"); //5000:托盘图标显示5秒 //标题为"系统提示" //内容为"系统正在运行" //ToolTipIcon.Info:提... 阅读全文
posted @ 2012-03-24 09:51 ghypnus 阅读(404) 评论(0) 推荐(0) 编辑
摘要: //单元格点击事件 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { //获取某个单元格的值的数据类型名称 MessageBox.Show(dataGridView1[e.ColumnIndex, e.RowIndex].Value.GetType().Name); } 阅读全文
posted @ 2012-03-24 09:27 ghypnus 阅读(188) 评论(0) 推荐(0) 编辑
摘要: //显示选中的文字 private void showText(string title) { //定义空字符串 string str = string.Empty; //以下确认该字符串的值 if (checkBox1.Checked && !checkBox2.Checked) str = checkBox1.Text; if (checkBox2.Checked && !checkBox1.Checked)... 阅读全文
posted @ 2012-03-24 09:23 ghypnus 阅读(359) 评论(0) 推荐(0) 编辑