M
Mark
Hi,
Starting with a clean smartphone project, I have the main form with a
textbox in it called textBox1. I'm trying to add text to it using
SendMessage (to avoid that annoying flicker). Here are the pinvokes...
const uint EM_REPLACESEL = 0xc2;
[DllImport("coredll")]
extern static IntPtr GetCapture();
[DllImport("coredll")]
extern static int SendMessage(IntPtr hWnd, uint Msg, bool WParam,
string LParam);
Here's the code that should update the textbox:
textBox1.Capture = true;
IntPtr hWnd = GetCapture();
textBox1.Capture = false;
SendMessage(hWnd, EM_REPLACESEL, false, "hello");
I successfully get a handle on the text box, but the word "hello"
doesn't appear in the text box. Any ideas what I'm doing wrong here?
TIA
Mark
Starting with a clean smartphone project, I have the main form with a
textbox in it called textBox1. I'm trying to add text to it using
SendMessage (to avoid that annoying flicker). Here are the pinvokes...
const uint EM_REPLACESEL = 0xc2;
[DllImport("coredll")]
extern static IntPtr GetCapture();
[DllImport("coredll")]
extern static int SendMessage(IntPtr hWnd, uint Msg, bool WParam,
string LParam);
Here's the code that should update the textbox:
textBox1.Capture = true;
IntPtr hWnd = GetCapture();
textBox1.Capture = false;
SendMessage(hWnd, EM_REPLACESEL, false, "hello");
I successfully get a handle on the text box, but the word "hello"
doesn't appear in the text box. Any ideas what I'm doing wrong here?
TIA
Mark