随笔分类 -  winform

摘要:1、使用Assembly类定义和加载程序集,加载在程序集清单中列出模块,以及从此程序集中查找类型并创建该类型的实例。2、使用MethodInfo了解方法的名称、返回类型、参数、访问修饰符(如pulic 或private)和实现详细信息(如abstract或virtual)等。使用Type的GetMethods或GetMethod方法来调用特定的方法。反射的作用: 1. 可以使用反射动态地创建类型的实例,将类型绑定到现有对象,或从现有对象中获取类型 2. 应用程序需要在运行时从某个特定的程序集中载入一个特定的类型,以便实现某个任务时可以用到反射。 3. 反射主要应用与类库,这些类库需要知道一个类 阅读全文
posted @ 2012-12-14 07:31 shuangyihaiying 阅读(150) 评论(0) 推荐(0)
摘要:1.不显示第一个空白列RowHeaderVisible属性设置为false2.点击cell选取整行SelectinModel属性FullRowSelectRowSelectinModel属性设置或用CellClick事件也可以//整行选取privatevoiddataGridView1_CellClick(objectsender,DataGridViewCellEventArgse){//e.RowIndex>-1否则点击header也是叫一列if(dataGridView1.Rows.Count>0&&e.RowIndex>-1){//MessageBox 阅读全文
posted @ 2012-12-14 07:26 shuangyihaiying 阅读(389) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ComponentModel; using System.Collections;using System.Diagnostics;using System.Windows.Forms;using System.Drawing;using System.Drawing.Drawing2D;namespace Project{ [ToolboxItem(true)] public partial... 阅读全文
posted @ 2012-12-11 11:44 shuangyihaiying 阅读(3770) 评论(0) 推荐(0)