VB6 user defined controls (inheritence?)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




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?

.



Relevant Pages

  • Re: VB6 user defined controls (inheritence?)
    ... I am writing two graphic controls using classic VB. ... otherwise the functionality is the same. ... control as a BaseControl and using that control in a new control ... with Dynamic data - but I'm not convinced this is the best approach. ...
    (microsoft.public.vb.enterprise)
  • Is it possible to create controls dynamically.
    ... Is it possible to create control or arrays dynamically in LabVIEW.That means i want to create controls at run time depending on the dynamic data. ...
    (comp.lang.labview)
  • Re: HELP I am about to quit on AS2005
    ... I miss Undo/Redo functionality in VS2005. ... make comlex involving stuff a breeze, but at the expense of control on the ... I feel the MDX syntax needs more ... SQL server manager managegement studio and MDX for data access. ...
    (microsoft.public.sqlserver.olap)
  • Re: Moving MsgBox
    ... you need to provide the same functionality which includes ... The taskswapper is a fully functional, ... necessary to use it as an OCX, and compiled the AX control. ... Memory footprint or combined file sizes? ...
    (microsoft.public.vb.general.discussion)
  • Re: Re: hey, go believe a bankruptcy
    ... As completely as Haji offsets, you can control the writing much more ... If the rich proceeds can position somewhat, ...
    (sci.crypt)