以前做过Web的Form有个Title属性,不知道Win Form里怎么实现?

解决方案 »

  1.   

    ToolTip 类
    表示一个长方形的弹出式小窗口,该窗口在鼠标悬停在一个控件上时显示有关该控件用途的简短说明。
    // This example assumes that the Form_Load event handling method
    // is connected to the Load event of the form.
    private void Form1_Load(object sender, System.EventArgs e)
    {
       // Create the ToolTip and associate with the Form container.
       ToolTip toolTip1 = new ToolTip();   // Set up the delays for the ToolTip.
       toolTip1.AutoPopDelay = 5000;
       toolTip1.InitialDelay = 1000;
       toolTip1.ReshowDelay = 500;
       // Force the ToolTip text to be displayed whether or not the form is active.
       toolTip1.ShowAlways = true;
          
       // Set up the ToolTip text for the Button and Checkbox.
       toolTip1.SetToolTip(this.button1, "My button1");
       toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
    }
      

  2.   

    需要在datagrid的mousemove事件中添加获取该行index的代码,有了index剩下的......
      

  3.   

    toolTip2.SetToolTip(this.dataGridUser, this.dataGridUser[this.dataGridUser.CurrentCell.RowNumber,this.dataGridUser.CurrentCell.ColumnNumber].ToString());
      

  4.   

    一定要在CurrentCellChanged事件中添加
    toolTip2.SetToolTip(this.dataGridUser, this.dataGridUser[this.dataGridUser.CurrentCell.RowNumber,this.dataGridUser.CurrentCell.ColumnNumber].ToString());
      

  5.   

    wangsaokui(无间道III(终极无间)) 
    我想实现的是 鼠标落上 显示有关该行的记录的一条信息(比如ID),请你继续,有了index后……
      

  6.   

    我用的Grid没有CurrentCellChanged事件,用mousemove事件又无法
      

  7.   

    datagrid1.item(datagrid1.currentrowindex,0)
    datagrid1.currentrowindex为当前行数,0为列索引
      

  8.   

    我用的Grid没有currentrowindex属性,请问还有什么方法在mousemove事件中获取当前行吗?
      

  9.   

    win form里dataGrid没有CurrentCellChanged事件??
      

  10.   

    不知道  anantnt203120(阿南)  怎么搞的?
    竟然说win form里dataGrid没有CurrentCellChanged事件
      

  11.   

    TO hanbinghai(海宁) 
    TOOLTIP具体包括在哪个类中
      

  12.   

    晕~~!都不知道吗?win form里也不光DataGrid一个标准控件啊,还可以使用很多其他公司开发的控件,我用的就是C1FlexGrid控件,确实不支持CurrentCellChanged事件,请问还有其他方法实现吗?
      

  13.   

    TO hanbinghai(海宁) 
    没有看见呀,是在哪个工具选项卡上?
      

  14.   

    private System.Windows.Forms.ToolTip toolTip2 = new System.Windows.Forms.ToolTip();
    在dataGrid的CurrentCellChanged事件中添加
    toolTip2.SetToolTip(this.dataGridUser, this.dataGridUser[this.dataGridUser.CurrentCell.RowNumber,this.dataGridUser.CurrentCell.ColumnNumber].ToString());
      

  15.   

    工具箱上没有toolTip控件需要自己添加:
    工具箱->windows窗体 点右键->添加/删除项(I)...->.NET Fromeworke组件->将ToolTip选上
    ok,看看工具箱上是不是有了ToolTip控件?
      

  16.   

    anantnt203120(阿南) 你只说是在windows应用程序中的DataGrid 现在才说是C1FlexGrid控件
    ^_^
      

  17.   

    可以用坐标检测来得到当前行。e.x,e.y
      

  18.   

    wangsaokui(无间道III(终极无间)) 能进来把你的答案继续下去吗?