CAVESTER Posted December 10, 2003 Posted December 10, 2003 Hi Folks! I am trying to do a simple thing here :rolleyes: Anyway, what I am trying to learn is the basic art of Inheritance and what I thought I'd like to achieve is... if I have say five forms in my app and I click a button on one of them I want all the forms to change color. Like when you change the colors in XP and all window frames change color. I had a go but unfortunatly not very successfully. Can someone point me in the right direction please? Thanks, Lee. Quote
Administrators PlausiblyDamp Posted December 10, 2003 Administrators Posted December 10, 2003 Not entirely sure inheritance is entirely the correct solution here. Also if you want to learn inheritance and OOP ideas in general then a more back to basics approach may be in order. not .Net but worth a look : http://www.quiver.freeserve.co.uk/OOP1.htm same again but also worth a look http://homepages.unl.ac.uk/~chalkp/proj/ootutor/oopconcepts.html Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
HJB417 Posted December 10, 2003 Posted December 10, 2003 Hi Folks! I am trying to do a simple thing here :rolleyes: Anyway, what I am trying to learn is the basic art of Inheritance and what I thought I'd like to achieve is... if I have say five forms in my app and I click a button on one of them I want all the forms to change color. Like when you change the colors in XP and all window frames change color. I had a go but unfortunatly not very successfully. Can someone point me in the right direction please? Thanks, Lee. What I would do is create a static Array that stores a reference to these five forms and create a static method that changes the color of each Form in the Array. Quote
CAVESTER Posted December 10, 2003 Author Posted December 10, 2003 Not entirely sure inheritance is entirely the correct solution here Wondered why it wasn't working, I did think however that changing the base form should change any derived forms but it didn't? L. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.