|
-
Jul 16th, 2006, 11:17 AM
#1
Thread Starter
New Member
Container control?
Hi.
I want to make a custom control where I can put other controls at design time.
In vb6 I only had to change a property. But with VB 2005 Express I'm totally stuck.
I already added this code:
VB Code:
<System.ComponentModel.Designer("System.Windows.Forms.Design.ParentControlDesigner,System.Design", GetType(System.ComponentModel.Design.IDesigner))> _
Public Class ExpandContainerNet
Inherits System.Windows.Forms.UserControl
But then when I want to drop a control over my control it gets just behind it and not into the control. What I am missing?
Thanks.
-
Jul 24th, 2006, 09:43 AM
#2
Thread Starter
New Member
Re: Container control?
Anyone?
Thanks very much.
-
Jul 24th, 2006, 10:14 AM
#3
Frenzied Member
Re: Container control?
I didn't read the entire article, but it looks like this shoudl have the answer.
http://www.codeproject.com/vb/net/Cu...nerControl.asp
-
Jul 24th, 2006, 10:37 AM
#4
Thread Starter
New Member
Re: Container control?
Yes, I read this article. But doesn't help me. Sorry.
I remember VB6.0 and how easy that was...
-
Jul 24th, 2006, 10:46 AM
#5
Frenzied Member
Re: Container control?
Depending on what you are doing you could always inherit a container control, like the panel. That would allow you to add controls to it at design time.
-
Jul 24th, 2006, 10:49 AM
#6
Frenzied Member
Re: Container control?
Or, just inherit Windows.Forms.ContainerControl. I just created a usercontrol inherited that, and it allows you to add controls at design time.
-
Jul 24th, 2006, 10:52 AM
#7
Thread Starter
New Member
Re: Container control?
Ok, I'll try that. Thank you very much.
-
Jul 24th, 2006, 11:59 AM
#8
Addicted Member
Re: Container control?
i don't know if this is correct but try right clicking the container (in the form designer) and click send to back
if this is right go to thread tools at the top of this page and mark this page resolved
:-)
-
Jul 24th, 2006, 12:07 PM
#9
Frenzied Member
Re: Container control?
Louix, that is not what beniwtv is asking. He is asking how to create a control that is like the panel, or groupbox where you can add controls to these controls. Z order doesn't have anything to do with it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|