Click here to Skip to main content
15,911,035 members
Home / Discussions / C#
   

C#

 
AnswerRe: Preferred style Pin
Luc Pattyn26-Oct-11 6:31
sitebuilderLuc Pattyn26-Oct-11 6:31 
AnswerRe: Preferred style Pin
SledgeHammer0126-Oct-11 8:42
SledgeHammer0126-Oct-11 8:42 
GeneralRe: Preferred style Pin
harold aptroot26-Oct-11 9:09
harold aptroot26-Oct-11 9:09 
GeneralRe: Preferred style Pin
SledgeHammer0126-Oct-11 9:24
SledgeHammer0126-Oct-11 9:24 
AnswerRe: Preferred style Pin
BobJanova26-Oct-11 22:39
BobJanova26-Oct-11 22:39 
AnswerCheers Pin
Reiss27-Oct-11 22:02
professionalReiss27-Oct-11 22:02 
QuestionHandling Usercontrol with menu items in C# Pin
Hammad Rasheed25-Oct-11 23:36
Hammad Rasheed25-Oct-11 23:36 
AnswerRe: Handling Usercontrol with menu items in C# Pin
V.26-Oct-11 1:16
professionalV.26-Oct-11 1:16 
There are a few options. I'm not sure what will bring the best performance:

Note: I assume your usercontrols are more or less the same size?
1.
Add the three usercontrols when the form loads, but make them invisible (or make a default visible and hide the others) In the event handler of the menu item you can then switch visibility accordingly.
I think this will have a good performance, but with higher memory usage.

2.
Add/Remove the controls dynamically from the form. The most easy way is to add a panel that will contain the usercontrol.
You can then do something like mypanel.Controls[0].Add(new ..._UserControl) (and a similar call for remove)
Note that you probably need instantiate an object of the usercontrol and set some properties before adding.
This will be a little slower, but less Memory consuming.

Hope this helps.
V.

AnswerRe: Handling Usercontrol with menu items in C# Pin
PIEBALDconsult26-Oct-11 2:33
mvePIEBALDconsult26-Oct-11 2:33 
QuestionRe: Handling Usercontrol with menu items in C# Pin
Luc Pattyn26-Oct-11 4:16
sitebuilderLuc Pattyn26-Oct-11 4:16 
AnswerRe: Handling Usercontrol with menu items in C# Pin
PIEBALDconsult26-Oct-11 14:50
mvePIEBALDconsult26-Oct-11 14:50 
AnswerFlag: Repost of QA question: Re: Handling Usercontrol with menu items in C# Pin
BillWoodruff27-Oct-11 21:05
professionalBillWoodruff27-Oct-11 21:05 
QuestionInsert image on ricktextbox Pin
Chu Van Dat25-Oct-11 15:56
Chu Van Dat25-Oct-11 15:56 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn25-Oct-11 16:24
sitebuilderLuc Pattyn25-Oct-11 16:24 
GeneralRe: Insert image on ricktextbox Pin
Mycroft Holmes25-Oct-11 21:44
professionalMycroft Holmes25-Oct-11 21:44 
GeneralRe: Insert image on ricktextbox Pin
BobJanova25-Oct-11 22:54
BobJanova25-Oct-11 22:54 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn26-Oct-11 0:36
sitebuilderLuc Pattyn26-Oct-11 0:36 
GeneralRe: Insert image on ricktextbox Pin
BobJanova26-Oct-11 2:47
BobJanova26-Oct-11 2:47 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn26-Oct-11 4:12
sitebuilderLuc Pattyn26-Oct-11 4:12 
GeneralRe: Insert image on ricktextbox Pin
BobJanova26-Oct-11 5:09
BobJanova26-Oct-11 5:09 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn26-Oct-11 5:21
sitebuilderLuc Pattyn26-Oct-11 5:21 
QuestionCreate LDAP Listener Pin
tellaston134525-Oct-11 8:01
tellaston134525-Oct-11 8:01 
QuestionSorting in multiple columns in gridview using C# Pin
Dhyanga25-Oct-11 7:01
Dhyanga25-Oct-11 7:01 
AnswerRe: Sorting in multiple columns in gridview using C# Pin
Not Active25-Oct-11 8:36
mentorNot Active25-Oct-11 8:36 
GeneralRe: Sorting in multiple columns in gridview using C# Pin
Dhyanga25-Oct-11 9:32
Dhyanga25-Oct-11 9:32 

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.