|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to use Form.GetChildAtPointHi.
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 Show quote "Jan Weingärtner" <jweing***@gmx.de> escribió en el mensaje news:OsWflnj0EHA.1392@TK2MSFTNGP14.phx.gbl... > 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 Does your panel have a height and width of at least 50?
Show quote "Jan Weingärtner" <jweing***@gmx.de> wrote in message news:OsWflnj0EHA.1392@TK2MSFTNGP14.phx.gbl... > 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 |
|||||||||||||||||||||||