Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inheritance using the VB File Object 1

Status
Not open for further replies.

bakerm

Programmer
Apr 25, 2000
53
US
I need to use the properties of the VB File Object and add a property to it.  Inheritance is something that I have never worked with so any help would be appreciated.
 
Well, VB really doesn't do inheritance yet (VB7),&nbsp;&nbsp;but the easiest way to accomplish what you want is to create a class that supports all the properties of the file object, plus the extra one you want.&nbsp;&nbsp; <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Nick,<br><br>This, I think, would be done using the <FONT FACE=monospace><b>Implements</font></b> keyword.<br><br>I saw a nice example that added some behaviour to a standard TextBox - so that you didn't have to add code to every instance of a TextBox in an application - just use the new TextBox class.<br><br>Can't remember where I saw it :-( does that ring any bells with you? <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Yep, you could use implements, but in this case I'd just go with the class.&nbsp;&nbsp;IMHO, it would be a lot less work.<br><br>Never saw the example you referred to.&nbsp;&nbsp;If you find it, let us know.<br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top