How to Find the Control of a window opened in c#
-
Hi, I had window Form application in which some text is entered in TextBox and On a button Click, the text in the textbox should be copied through clipboard and those text has to be pasted on other window which has been opened. I have copied the text through if(String.IsEmptyORNull(TextBox1.Text)) string CopiedText = ClipBoard.SetText(TextBox1.Text); i.e., For example, If I want to paste the copied text in the internet explorer in which http;//www.google.com/ is opened, I have to paste that copied text in the searchbox of google site opened in internet explorer. I have tried to Find the handle through IntPtr IEHwnd = FindWindow("IEFrame", Null); and there after If(IEHwnd != IntPtr.Zero) { MessageBox.Show("Handle Found"); SendMessage(IEHwnd, WM_PASTE,0,0); } But This is also doesn't effect? How to approach?
-
Hi, I had window Form application in which some text is entered in TextBox and On a button Click, the text in the textbox should be copied through clipboard and those text has to be pasted on other window which has been opened. I have copied the text through if(String.IsEmptyORNull(TextBox1.Text)) string CopiedText = ClipBoard.SetText(TextBox1.Text); i.e., For example, If I want to paste the copied text in the internet explorer in which http;//www.google.com/ is opened, I have to paste that copied text in the searchbox of google site opened in internet explorer. I have tried to Find the handle through IntPtr IEHwnd = FindWindow("IEFrame", Null); and there after If(IEHwnd != IntPtr.Zero) { MessageBox.Show("Handle Found"); SendMessage(IEHwnd, WM_PASTE,0,0); } But This is also doesn't effect? How to approach?