Showing Caret on a richtextbox in main window behind - 07-02-2004 , 01:21 AM
I have an application that will pop up a listboxwindow
(containing words that users can choose from)
when I type certain characters on a richtextbox.
Now I have a problem of maintaining the caret at the
richtextbox, because once the listboxwindow pops up, the
input focus will move to the listboxwindow.
How can I make the caret stay at the richtextbox?
I tried the following but it didn't work:
if(m.Msg == WM_NCACTIVATE)
if (((int) m.WParam) == 0)
SendMessage(this.Handle, WM_NCACTIVATE, 1,
SendMessage(this.Handle, WM_SETFOCUS, 1,
CreateCaret(this.Handle, IntPtr.Zero, 0, 0);
Any idea would be appreciated.
Thank you in advance.
|Thread Tools||Search this Thread|