I spent many days for sending text value to focused textbox of other application in C#.
My code:
IntPtr txtLot = FindWindowEx(orderdialog, new IntPtr(0), "Edit", null);
SendMessage(txtLot, WM_SETTEXT, 0, lot.ToString());
I want any one solution of my two choice.
Choice 1: There are three edit controls that I found in spy++. In the Above code, I got only 1st edit control. But I need to get IntPtr of 2nd edit control value to send some string.
Choice 2: We can use tab key to focus the 2nd edit control. In that, 2nd control is focused but I can't able to send string. Because I don't know the IntPtr of focused control textbox. How to get the IntPtr of focused control.
Please suggest me which choice is suitable.
Please help me.