Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • Administrators
Posted

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

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
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.

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...