Usercontrol as variable: Where's the Move method???

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi all,

I have two user controls in such a way that UserControl1 contains
UserControl2.
For resource reasons (they're really big, fat user controls!) I want
to create and load UserControl2 at run time.

For that, I create a WithEvents variable of type UserControl2, and
Create the control using Usercontrol.Controls.Add.
So far, so good.

Now I'd like to pan my new control to fill the entire space.
WHAT??
No Move method! No Left, Top, Width or Height property either?

When, instead of using a variable, I simply draw the control in the
designer, I can access all of those without any problems.

What's going on here? Any ideas?

Thanks!

Robert
.



Relevant Pages

  • Re: Delegate / Multi-User Control Question
    ... UserControl2 does the data retrieval from the db ... UserControl3 is the "hosting" control that has as one of ... The tab control then picks this up (or the host of the tab ... >> grid hosted there a new user control is created. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Delegate / Multi-User Control Question
    ... Ok, ran into a problem w/ my approach, the issue is that the tab control is ... defined as non-static and I'm referencing it w/i a static method - which ... UserControl2 then populates the data from the db into itself (it's ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Usercontrol as variable: Wheres the Move method???
    ... For resource reasons (they're really big, fat user controls!) I want ... to create and load UserControl2 at run time. ... Now I'd like to pan my new control to fill the entire space. ... Private Sub UserControl_Resize ...
    (microsoft.public.vb.general.discussion)
  • User Controls Dynamically Loaded and Nested
    ... ASPX Page dynamically loads userControl1 - which in turn dynamically loads ... UserControl2 contains a TextBox Web Server control. ... When a user clicks a button in the ASPX page (not in either user ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: design guidance please :user controls and centralizing roles-r
    ... code that would instantiate class instances, one for each control name that ... I'm curious to what extent you're thinking the layout and display ... I am fairly new to C#, lists, ... User controls need to be visible or not visible depending on user ...
    (microsoft.public.dotnet.framework.aspnet)