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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. GetChildAtPoint to get Control Out of Screen?

GetChildAtPoint to get Control Out of Screen?

Scheduled Pinned Locked Moved .NET (Core and Framework)
question
4 Posts 2 Posters 1 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.
  • T Offline
    T Offline
    tsunsau717
    wrote on last edited by
    #1

    Dear all, The function System.Windows.Forms.Control.GetChildAtPoint(Point pt) find control reference to the Control's Client Rectangle. However, I am looking for a Control that is out of screen. i.e. out of the Client Rectangle, but within the Display Rectangle. Is there any method for me to get that Control by a Coordinate point? Many Thanks.

    D 1 Reply Last reply
    0
    • T tsunsau717

      Dear all, The function System.Windows.Forms.Control.GetChildAtPoint(Point pt) find control reference to the Control's Client Rectangle. However, I am looking for a Control that is out of screen. i.e. out of the Client Rectangle, but within the Display Rectangle. Is there any method for me to get that Control by a Coordinate point? Many Thanks.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Are you looking to get a control that sits on a different Form? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      T 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Are you looking to get a control that sits on a different Form? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        T Offline
        T Offline
        tsunsau717
        wrote on last edited by
        #3

        It is on the same form. The control hierarchy is like this: Form |-Groupbox A |---TextBox A | |-Groupbox B |---TextBox B However, the size of the Form can only show the Groupbox A. I have to scroll down in order to show another groupbox. Now I have the coordinate of Groupbox B and TextBox B, can I get the control TextBox B by its coordinate point when the screen is still showing GroupBox A??? Many Thanks!!

        D 1 Reply Last reply
        0
        • T tsunsau717

          It is on the same form. The control hierarchy is like this: Form |-Groupbox A |---TextBox A | |-Groupbox B |---TextBox B However, the size of the Form can only show the Groupbox A. I have to scroll down in order to show another groupbox. Now I have the coordinate of Groupbox B and TextBox B, can I get the control TextBox B by its coordinate point when the screen is still showing GroupBox A??? Many Thanks!!

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You'll just have to try it. There is a chance that it might not work because it's not visible, and therefore, not being drawn. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          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