텍스트박스의 캐럿 비활성화 예제이오니 개발 시 참고하세요...
using System.Runtime.InteropServices;
[DllImport("user32.dll")]
static extern bool HideCaret(IntPtr hWnd);
private void Form_Load(object sender, EventArgs e)
{
textBox1.GotFocus += new EventHandler(textBox1_GotFocus);
}
private void textBox1_GotFocus(object sender, EventArgs e)
{
HideCaret(textBox1.Handle);
}
'C#' 카테고리의 다른 글
[C#]win api를 이용한 키보드 이벤트(keybd_event) 예제 (0) | 2018.05.18 |
---|---|
[C#]카운트다운 예제 (0) | 2018.05.16 |
[C#]Scrolling Text 예제 (0) | 2018.04.19 |
[C#]PC 전원종료 시간 구하기 예제 (0) | 2018.01.25 |
[C#]클릭 시간 확인 예제 (0) | 2018.01.24 |