Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
AnswerRe: Usercontrol poser ( rusty Winforms guy ) Pin
OriginalGriff29-Nov-18 4:49
mveOriginalGriff29-Nov-18 4:49 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
pkfox29-Nov-18 5:24
professionalpkfox29-Nov-18 5:24 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
OriginalGriff29-Nov-18 5:32
mveOriginalGriff29-Nov-18 5:32 
AnswerRe: Usercontrol poser ( rusty Winforms guy ) Pin
BillWoodruff1-Dec-18 16:52
professionalBillWoodruff1-Dec-18 16:52 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
pkfox1-Dec-18 21:04
professionalpkfox1-Dec-18 21:04 
AnswerRe: Usercontrol poser ( rusty Winforms guy ) Pin
BillWoodruff2-Dec-18 0:43
professionalBillWoodruff2-Dec-18 0:43 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
pkfox2-Dec-18 3:48
professionalpkfox2-Dec-18 3:48 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
BillWoodruff2-Dec-18 4:06
professionalBillWoodruff2-Dec-18 4:06 
pkfox wrote:
did you ever find a way of visually removing controls
Hi, do you mean something more than setting their 'Visible property to 'false ? ummm ... when you got a reference, you can do whatever:
ControlDict = this.Controls.FindAll();

Control theButton = ControlDict["button1"];

theButton.BackColor = Color.FromArgb(255, 230, 0);

theButton.Location = new Point(0, 0);

theButton.Hide();

// in practice I'd wrap this in a try/catch for safety, and handle any errors
ControlDict.Remove(theButton.Text);

theButton.Parent.Controls.Remove(theButton);
To pursue this further and compare these rather hackish caniptions with another WinForm app strategy, it would interest me to have a clearer idea of what you want to achieve ... the other strategy would be using what I call the "switchboard model," with a static class handling all inter-form/control interactions and visual state changes... a poor-boy's MVC, perhaps.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot


modified 2-Dec-18 11:33am.

GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
pkfox2-Dec-18 6:03
professionalpkfox2-Dec-18 6:03 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
BillWoodruff2-Dec-18 6:51
professionalBillWoodruff2-Dec-18 6:51 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
BillWoodruff2-Dec-18 18:57
professionalBillWoodruff2-Dec-18 18:57 
GeneralRe: Usercontrol poser ( rusty Winforms guy ) Pin
pkfox2-Dec-18 19:21
professionalpkfox2-Dec-18 19:21 
QuestionRead and write JSON in c# WinForms Pin
jkirkerx28-Nov-18 13:20
professionaljkirkerx28-Nov-18 13:20 
AnswerRe: Read and write JSON in c# WinForms Pin
OriginalGriff28-Nov-18 19:39
mveOriginalGriff28-Nov-18 19:39 
GeneralRe: Read and write JSON in c# WinForms Pin
jkirkerx29-Nov-18 8:51
professionaljkirkerx29-Nov-18 8:51 
AnswerRe: Read and write JSON in c# WinForms Pin
Mc_Topaz28-Nov-18 20:05
Mc_Topaz28-Nov-18 20:05 
GeneralRe: Read and write JSON in c# WinForms Pin
jkirkerx29-Nov-18 8:49
professionaljkirkerx29-Nov-18 8:49 
AnswerRe: Read and write JSON in c# WinForms Pin
Richard Deeming29-Nov-18 1:09
mveRichard Deeming29-Nov-18 1:09 
GeneralRe: Read and write JSON in c# WinForms Pin
jkirkerx29-Nov-18 9:47
professionaljkirkerx29-Nov-18 9:47 
AnswerRe: Read and write JSON in c# WinForms Pin
jkirkerx29-Nov-18 9:46
professionaljkirkerx29-Nov-18 9:46 
AnswerI finally got it Pin
jkirkerx29-Nov-18 10:42
professionaljkirkerx29-Nov-18 10:42 
QuestionGet Numbers That Make Up A Binary Number Pin
Kevin Marois28-Nov-18 5:48
professionalKevin Marois28-Nov-18 5:48 
AnswerRe: Get Numbers That Make Up A Binary Number Pin
OriginalGriff28-Nov-18 5:55
mveOriginalGriff28-Nov-18 5:55 
GeneralRe: Get Numbers That Make Up A Binary Number Pin
Kevin Marois28-Nov-18 7:03
professionalKevin Marois28-Nov-18 7:03 
GeneralRe: Get Numbers That Make Up A Binary Number Pin
OriginalGriff28-Nov-18 8:15
mveOriginalGriff28-Nov-18 8:15 

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.