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

C#

 
QuestionScale form with it controls Pin
seq-17-Nov-06 3:36
seq-17-Nov-06 3:36 
AnswerRe: Scale form with it controls Pin
seq-17-Nov-06 4:16
seq-17-Nov-06 4:16 
QuestionChanging a Control at run time Pin
Gareth H17-Nov-06 3:18
Gareth H17-Nov-06 3:18 
AnswerRe: Changing a Control at run time Pin
Rey999917-Nov-06 4:23
Rey999917-Nov-06 4:23 
AnswerRe: Changing a Control at run time [modified] Pin
Martin#17-Nov-06 10:37
Martin#17-Nov-06 10:37 
GeneralRe: Changing a Control at run time Pin
Gareth H21-Nov-06 3:34
Gareth H21-Nov-06 3:34 
GeneralRe: Changing a Control at run time Pin
Martin#21-Nov-06 9:20
Martin#21-Nov-06 9:20 
GeneralRe: Changing a Control at run time Pin
Gareth H21-Nov-06 22:46
Gareth H21-Nov-06 22:46 
SimulationModel newControl = new SimulationModel(session, true);<br />
                    EditModel oldControl = this as EditModel;<br />
<br />
                    PropertyDescriptorCollection pdcoldControl = TypeDescriptor.GetProperties(oldControl);<br />
                    PropertyDescriptorCollection pdcnewControl = TypeDescriptor.GetProperties(newControl);<br />
<br />
                    foreach (PropertyDescriptor pdoldControl in pdcoldControl)<br />
                    {<br />
                        if ((pdoldControl.Attributes.Contains(CategoryAttribute.Appearance) && pdoldControl.IsBrowsable)<br />
                        || (pdoldControl.Attributes.Contains(CategoryAttribute.Behavior) && pdoldControl.IsBrowsable && pdoldControl.IsReadOnly == false))<br />
                        {<br />
                            PropertyDescriptor pdnewControl = pdcnewControl[pdoldControl.Name];<br />
                            pdnewControl.SetValue(newControl, pdoldControl.GetValue(oldControl));<br />
                        }<br />
                    }<br />
<br />
                    TypeDescriptor.Refresh(oldControl);<br />
                    TypeDescriptor.Refresh(newControl);<br />
<br />
                    newControl.Size = oldControl.Size;<br />
                    newControl.Text = oldControl.Text;<br />
<br />
                    oldControl.Dispose();<br />
                    Controls.Add(newControl);<br />
                    newControl.BringToFront();

GeneralRe: Changing a Control at run time Pin
Martin#22-Nov-06 2:12
Martin#22-Nov-06 2:12 
GeneralRe: Changing a Control at run time Pin
Martin#12-Dec-06 0:55
Martin#12-Dec-06 0:55 
GeneralRe: Changing a Control at run time Pin
Gareth H12-Dec-06 6:25
Gareth H12-Dec-06 6:25 
QuestionDefine ClipRectangle for ChildControls Pin
Norman-Timo17-Nov-06 3:16
Norman-Timo17-Nov-06 3:16 
QuestionNeed help regarding folder lock Pin
Waqas Nasir17-Nov-06 2:51
Waqas Nasir17-Nov-06 2:51 
AnswerRe: Need help regarding folder lock Pin
archananaresh29-Mar-09 18:20
archananaresh29-Mar-09 18:20 
GeneralTwo listviews Pin
V.17-Nov-06 2:43
professionalV.17-Nov-06 2:43 
Questioniterating arraylists Pin
numbers1thru917-Nov-06 2:04
numbers1thru917-Nov-06 2:04 
AnswerRe: iterating arraylists Pin
ejuanpp17-Nov-06 2:27
ejuanpp17-Nov-06 2:27 
GeneralRe: iterating arraylists Pin
numbers1thru917-Nov-06 2:47
numbers1thru917-Nov-06 2:47 
AnswerRe: iterating arraylists Pin
Private_Void17-Nov-06 2:29
Private_Void17-Nov-06 2:29 
GeneralRe: iterating arraylists Pin
numbers1thru917-Nov-06 2:48
numbers1thru917-Nov-06 2:48 
QuestionHow to read an exact character from text file Pin
CodeItWell17-Nov-06 1:34
CodeItWell17-Nov-06 1:34 
AnswerRe: How to read an exact character from text file Pin
Colin Angus Mackay17-Nov-06 1:46
Colin Angus Mackay17-Nov-06 1:46 
AnswerRe: How to read an exact character from text file Pin
V.17-Nov-06 2:44
professionalV.17-Nov-06 2:44 
GeneralRe: How to read an exact character from text file Pin
ednrgc17-Nov-06 4:53
ednrgc17-Nov-06 4:53 
Questiondynamic progressbar in C#.Net Pin
abdelhameed8117-Nov-06 0:46
abdelhameed8117-Nov-06 0:46 

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.