-
June 6th, 2005, 01:31 AM
#1
control with show method
I want to create a composite control which will consist of several windows controls like buttons,text boxes and grid. I want my control to have a SHOW method , just like the Windows form control..so that if I write control.show, then it will pop up just like the form control.Can anyone help me.
-
June 6th, 2005, 03:15 PM
#2
Re: control with show method
So you basically want your control to be a Windows Form? If so, use Windows Form to build your control.
Good Luck,
-Cool Bizs
-
June 12th, 2005, 12:15 AM
#3
Re: control with show method
But how to Add a form to a control...I tried it before...the form is placed seperately in the solution explorer. The user control1 and form are placed seperately.I want the form to be a part of the control.It will be a composite control consisting of a form , a datagrid and 2 buttons.And I want the control to have the show method just like the Form control, show that i can invoke it like control.show and the control will pop-up just like a form control.
-
June 12th, 2005, 09:24 PM
#4
Re: control with show method
Okay, I might not understand your problem exactly so bear w/ me.
So, have built a usercontrol that is basically a FORM (inherited System.Windows.Form) and has bunch of other controls on it right?
You want to add this user control into another control.
Now, each CONTROL object has CONTROLS collection. So, what you have to do is instantiate your user control, and then add it into the controls collection of the control. Then calling SHOW() method of your usercontrol, should display it inside the host control.
If you can, zip up your project (or part that is not working) and post it so that we can take a look at it.
Good Luck,
-Cool Bizs
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
|