Desktop Functions: Smart Device Functions:
|
Search Results for "CreateCaret" in [All]user321: CreateCaret
static extern bool CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth,
Public Shared Function CreateCaret(ByVal hWnd As IntPtr, ByVal hBitmap As IntPtr, ByVal nWidth As Integer, ByVal nHeight As Integer) As Boolean Windows allows only one caret per message queue. To add a caret to a control, handle the WM_SETFOCUS message, or the GotFocus event, or override OnGotFocus if you're writing a custom control, and call CreateCaret from the message or event handler. You should also handle WM_KILLFOCUS, LostFocus or OnLostFocus and call DestroyCaret. You will also need to call ShowCaret to make the caret visible, and SetCaretPos to set its position.
CreateCaret(textBox1.Handle, IntPtr.Zero, 0, textBox1.Height);
Public Shared Function CreateCaret(ByVal hWnd As IntPtr, ByVal hBitmap As IntPtr, ByVal nWidth As Integer, ByVal nHeight As Integer) As Boolean
CreateCaret(TextBox1.Handle, bmPtr, 2, 12) 2: DestroyCaret
3: ShowCaret
CreateCaret(listBox1.Handle,mybitmap.GetHbitmap(), 1, listBox1.Height); |