How to use Form.GetChildAtPoint

  • Thread starter Thread starter =?iso-8859-1?Q?Jan_Weing=E4rtner?=
  • Start date Start date
?

=?iso-8859-1?Q?Jan_Weing=E4rtner?=

Hi.

I have placed a panel at location (0,0) on a form.

With:

Control ctrl = this.GetChildAtPoint(new Point(50, 50));

i try to find the panel, but ctrl is always null.
What is my problem?

best regards and thanks,
Jan
 
I have tried this using VB.NET and it works fine, the Panel is retrieved. I
suppose that your panel is big enough, isn´t it?

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim ctrl As Control

ctrl = Me.GetChildAtPoint(New Point(50, 50))

End Sub
 
Well, it works now. I don't know why ... sorry

best regards,
Jan
 
Back
Top