VB6 user defined controls (inheritence?)
- From: Bit byte <flip@xxxxxxxx>
- Date: Tue, 06 Jun 2006 18:19:19 +0100
I am writing two graphic controls using classic VB (i.e. VB6). One control displays only static data whereas the other displays dynamic data - otherwise the functionality is the same.
95% of the time the functionality overlaps (i.e. is the same) - e.g. plot a line, resize etc,. and I want to avoid writing the same code twice, in cases where the functionality overlaps. Since VB does not support inheritence (at least not directly), is there anyway I can minimise the amount of code I can write twice ? I was thinking of using the first control as a BaseControl and using that control in a new control (DynamicControl) - where all I was doing was proviing new methods to deal with Dynamic data - but I'm not convinced this is the best approach. Any ideas?
.
- Follow-Ups:
- Re: VB6 user defined controls (inheritence?)
- From: Michael C
- Re: VB6 user defined controls (inheritence?)
- Prev by Date: Re: passing parameter to a function
- Next by Date: Re: passing parameter to a function
- Previous by thread: Dynamically resizing a label based on the length of text
- Next by thread: Re: VB6 user defined controls (inheritence?)
- Index(es):
Relevant Pages
|