本帖最后由 SL0413 于 2010-08-31 11:33:38 编辑

解决方案 »

  1.   

    label控件,在Font属性中选中下划线,在Text属性中输入若干个空格,完毕!
      

  2.   


    真不是你说的这个意思...label  这个可以不说...主要是label后面的内容,______可以看成是TextBox控件..不过以_____的形式显式____的最后面还要包含一个按钮,并且_____有输入光标..可接受用户输入..
      

  3.   

    做一个复合控件;前面是个TextBox后面是一个button()
      

  4.   

    TextBox怎么以_______方式显示呢.
      

  5.   

    public   class   UnderLineBox   :   TextBox 

    private   bool   m_underLine; public   bool   UnderLine 

    get   {   return   m_underLine;   } 
    set   

    if   (this.m_underLine   !=   value) 

    if(value) 

    this.BorderStyle   =   BorderStyle.None; 

    m_underLine   =   value; 



    protected   override   void   WndProc(ref   Message   m) 

    base.WndProc(ref   m); 
    if(m.Msg   ==   0xf   ||   m.Msg   ==   0x14   ||   m.Msg   ==   0x85) 

    if(this.BorderStyle   ==   BorderStyle.None) 

    if(m_underLine) 

    using(Graphics   g   =   Graphics.FromHwnd(this.Handle)) 

    g.DrawLine(SystemPens.ControlText,   0,   this.Height   -   1,   this.Width   -   1,   this.Height   -   1); 






    http://topic.csdn.net/u/20090214/11/19c2a6f9-090b-45c2-a1fa-36712b2b1090.html
      

  6.   

    你没有听说过有种函数叫:windowsAPI吗?
    using System.Runtime.InteropServices; [DllImport("Gdi32.dll")]
            public extern static IntPtr CreateRectRgn(int left, int top, int right, int bottom);
            [DllImport("User32.dll")]
            public extern static int SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bredraw);private void button2_Click(object sender, EventArgs e)
            {
                IntPtr hrgn = CreateRectRgn(1, 1, textBox1.Width - 1, textBox1.Height);
                SetWindowRgn(textBox1.Handle, hrgn, true);
            }