调用Windows API

1> 将TextBox的TabStop设置为false;

2> 在程序中相应位置加入下列代码

 

 

using System.Runtime.InteropServices;……[DllImport("user32", EntryPoint = "HideCaret")]private static extern bool HideCaret(IntPtr hWnd);……在TextBox的MouseDown事件中添入:HideCaret(((TextBox)sender).Handle);
文章出处:飞诺网(www.diybl.com):http://www.diybl.com/course/3_program/cshapo/csharpjs/20100714/441315.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-11-22
相关资源
相似解决方案