Click here to Skip to main content
15,913,487 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to store an object into a database? Pin
AndyG6-Mar-02 18:26
AndyG6-Mar-02 18:26 
Generalhelp in treeview needed Pin
4-Mar-02 22:38
suss4-Mar-02 22:38 
GeneralRe: help in treeview needed Pin
Anand Amirineni5-Mar-02 14:12
Anand Amirineni5-Mar-02 14:12 
QuestionHow to use SSL Pin
Felix Nielsen4-Mar-02 9:19
Felix Nielsen4-Mar-02 9:19 
QuestionHow to sublass visually a C# class Pin
4-Mar-02 6:03
suss4-Mar-02 6:03 
AnswerRe: How to sublass visually a C# class Pin
James T. Johnson4-Mar-02 14:12
James T. Johnson4-Mar-02 14:12 
GeneralRe: How to sublass visually a C# class Pin
5-Mar-02 3:19
suss5-Mar-02 3:19 
GeneralRe: How to sublass visually a C# class Pin
James T. Johnson5-Mar-02 7:37
James T. Johnson5-Mar-02 7:37 
JerzyPeter wrote:
1. UserControl doesn't have Dock property

It does have a Dock property, you may be confused as to when you can use it though. The Dock property is used to tell the control where it should position itself on its parent. Thus you can't see it in the property grid while you are designing the UserControl, only when you place the UserControl on a form or another UserControl will you see it.

JerzyPeter wrote:
2. My problem is this: when I create UserControl with bunch of controls (buttons, labels, comboboxes) I want to be able reuse this control and create a subclasses control with extra, for example, 3 buttons, 3 lables and one slider, then I would have to do it in code instead dropping these control on my UserControl.

I've just created a test for this and it worked. However there are some rules that you need to be aware of. When you visually inherit from a Form or a UserControl VS.NET bases the appearance on the latest build available; this can cause problems if you change both the base class and the inherited class without doing a build in-between.

Once you have your base UserControl done the way you would like, build your project/solution; this will create a compiled version of the UserControl so that you can edit the inherited class visually.

Now add another UserControl to your project, open it up in CodeView then change the line that declares your class so that inherits from the UserControl you want to base your new UserControl from. Now you should be able to open the new UserControl up in the VS.NET Forms Designer.

If you want e-mail me and I can post a quick sample showing this done on my website.

HTH,

James



Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978

GeneralRe: How to sublass visually a C# class Pin
6-Mar-02 2:44
suss6-Mar-02 2:44 
GeneralRe: How to sublass visually a C# class Pin
James T. Johnson6-Mar-02 9:02
James T. Johnson6-Mar-02 9:02 
GeneralRe: How to sublass visually a C# class Pin
6-Mar-02 10:59
suss6-Mar-02 10:59 
GeneralRe: How to sublass visually a C# class Pin
James T. Johnson6-Mar-02 12:42
James T. Johnson6-Mar-02 12:42 
GeneralRe: How to sublass visually a C# class Pin
7-Mar-02 3:31
suss7-Mar-02 3:31 
GeneralRe: How to sublass visually a C# class Pin
James T. Johnson7-Mar-02 6:06
James T. Johnson7-Mar-02 6:06 
QuestionAre ownerdrawn buttons available? Pin
4-Mar-02 3:53
suss4-Mar-02 3:53 
AnswerRe: Are ownerdrawn buttons available? Pin
James T. Johnson4-Mar-02 14:23
James T. Johnson4-Mar-02 14:23 
GeneralAccessing the shell Pin
4-Mar-02 1:51
suss4-Mar-02 1:51 
GeneralRe: Accessing the shell Pin
James T. Johnson4-Mar-02 14:30
James T. Johnson4-Mar-02 14:30 
GeneralRe: Accessing the shell Pin
4-Mar-02 21:19
suss4-Mar-02 21:19 
GeneralRe: Accessing the shell Pin
James T. Johnson4-Mar-02 22:13
James T. Johnson4-Mar-02 22:13 
GeneralRe: Accessing the shell Pin
5-Mar-02 1:37
suss5-Mar-02 1:37 
GeneralRe: Accessing the shell Pin
James T. Johnson5-Mar-02 8:21
James T. Johnson5-Mar-02 8:21 
GeneralRe: Accessing the shell Pin
5-Mar-02 20:57
suss5-Mar-02 20:57 
GeneralC# question Pin
Jon Newman4-Mar-02 1:05
Jon Newman4-Mar-02 1:05 
GeneralRe: C# question Pin
Michael P Butler4-Mar-02 1:25
Michael P Butler4-Mar-02 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.