handle OnMouseMove event,protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e) 
 
     { 
 
          DataGrid.HitTestInfo hti = this.HitTest(new Point(e.X, e.Y)); 
 
          if(hti.Type == DataGrid.HitTestType.ColumnResize) 
 
          { 
 
               //在这里做纪录
          } 
 
          base.OnMouseMove(e); 
 
     } 
 

解决方案 »

  1.   

    先创建一个记录结构的xml文档,然后每次运行程序的时候加载该文档,并根据该文档的记录来初始化DATAGRID的外观值,在运行中只要DATAGRID发生外观变化的时候动态改变这个XML文档的值。最后程序退出的时候保存该XML文档===========================================================
    ★CSDN助手.Net★功能简介:
    1、真正离线浏览,智能缓存,自动更新本地数据库,也能一次性下载论坛所有帖子,速度飞快。
    2、强大的搜索功能,能进行“标题”,“全文”及“作者”关键字搜索。
    3、帖子更新自动监测提醒(在线等待的时候不用不停的刷新帖子了)。
    4、分类收藏夹,可以非常方便的进行精华帖子本地典藏。
    5、可以选择保存用户名和密码,自动登录。
    6、方便的发贴和回复(可以群发)。
    7、自由设计个性签名。
    8、帖子内的Web连接自动探测,点击直接打开外部浏览器。
    9、可以自由设置帖子查看区的字体,颜色,背景。
    10、个人专区(我的帖子列表,我参与的帖子列表)。下载地址:http://www25.brinkster.com/nluyan/csdn.zip
      

  2.   

    怎么创建一个记录结构的xml文档呢?高手指点我啊!
      

  3.   

    比如说:
    <书名>
      <出版商>
       ....
      <出版商>
    <书名>详情可以参阅一些关于xml的书籍
      

  4.   

    try something like
        System.Xml.XmlDocument myXmlDocument = new System.Xml.XmlDocument();
        myXmlDocument.Load("guestbook.xml");
        System.Xml.XmlNode myXmlNode = myXmlDocument.DocumentElement.FirstChild;    // Create a new XML element and populate its attributes
        System.Xml.XmlElement myXmlElement = myXmlDocument.CreateElement("entry");
        myXmlElement.SetAttribute("name", "John");
        myXmlElement.SetAttribute("email", "[email protected]");
        myXmlElement.SetAttribute("location", "csdn");
        myXmlElement.SetAttribute("date", DateTime.Now.ToString());
        myXmlElement.InnerText = "hello world";
        
        // Insert the new element into the XML tree and save
        myXmlDocument.DocumentElement.InsertBefore(myXmlElement, myXmlNode);
        myXmlDocument.Save("guestbook.xml");also see
    How to create and save an XML file
    http://www.net-language.com/ProcessShowCode.asp?i=1877