I
ink
Hi All
I am trying to Select an item in a combobox on a form running in a different
application(written in C# CF2.0) and running in a different process using
the windows API.
I am developing with C# CF2.
This is my code and it always returns -1.
I know the text is in the combobox
And the Handle is defiantly correct for that combobox, because I can send a
screen tap to it and the list will drop down.
Please can some one take a look and let me know where I am going wrong.
uint CB_SELECTSTRING = 0x014d;
[DllImport("coredll.dll", EntryPoint = "SendMessage", CharSet =
CharSet.Auto)] //
static extern int SendMessage4(IntPtr hWnd, uint Msg, int wParam, string
lParam);
public int ComboBoxSelectString(IntPtr hWnd, string s, int StartAtIndex)
{
return SendMessage4(hWnd, CB_SELECTSTRING, StartAtIndex, s);
}
Thanks,
ink
I am trying to Select an item in a combobox on a form running in a different
application(written in C# CF2.0) and running in a different process using
the windows API.
I am developing with C# CF2.
This is my code and it always returns -1.
I know the text is in the combobox
And the Handle is defiantly correct for that combobox, because I can send a
screen tap to it and the list will drop down.
Please can some one take a look and let me know where I am going wrong.
uint CB_SELECTSTRING = 0x014d;
[DllImport("coredll.dll", EntryPoint = "SendMessage", CharSet =
CharSet.Auto)] //
static extern int SendMessage4(IntPtr hWnd, uint Msg, int wParam, string
lParam);
public int ComboBoxSelectString(IntPtr hWnd, string s, int StartAtIndex)
{
return SendMessage4(hWnd, CB_SELECTSTRING, StartAtIndex, s);
}
Thanks,
ink