"Chris Dunaway" <du******@gmail .comwrote in message
news:11******** **************@ o61g2000hsh.goo glegroups.com.. .
On Jul 25, 9:50 pm, "DM" <nos...@nospam. orgwrote:
>Hi All,
I'm having trouble accessing the ClientRectangle property on a panel
control.
At design-time it says that ClientRectangle is not a member of the Panel
class, but when I look at the QuickWatch at run-time I can clearly see it
is
part of the control parameters.
Am I missing something obvious? I'm running Visual Basic .NET v1.1.
-Duncan
I have no trouble accessing the ClientRectangle property. Can you
show some segment of code that shows the problem? Have you tried
casting to Control to get it:
Dim r As Rectangle = DirectCast(pane l1, Control).Client Rectangle
That sounds awfully strange.
Chris
Thanks, that seems to work fine.
As for a code snippet, all I do is add the panel to a form at design-time
then try to access that parameter from within the form code. ie.
MyFunction( Me.pnlMyPanel.C lientRectangle )
....and I get a 'ClientRectangl e' is not a member of class Panel... Very odd
because it is listed as a member in the MSDN library and when observed via
QuickWatch.
In any case it is working now and I really appreciate your suggestion.
-Duncan