Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to Find the Control of a window opened in c#

How to Find the Control of a window opened in c#

Scheduled Pinned Locked Moved C#
tutorialcsharpcomquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    svt gdwl
    wrote on last edited by
    #1

    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?

    R 1 Reply Last reply
    0
    • S svt gdwl

      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?

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      Does this[^] article help? /ravi

      My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups