|
-
May 11th, 2007, 06:34 PM
#1
Thread Starter
Junior Member
Adding Additional Code Components
I want to include the ability to add new code components to a VB6 client app that I am writing now. Suppose for example, my EXE client is a 'car driver program', and suppose I have created 3 'car' components... Then at run time, I could do something like:
Dim objCar As Object
Select Case iCar
Case 1
Set objCar = CreateObject("Ford.Car")
Case 2
Set objCar = CreateObject("RollsRoyce.Car")
Case Else
Set objCar = CreateObject("Volkswagen.Car")
End Select
objCar.StartEngine
iGasLevel = objCar.GetGasLevel
...
This all looks fine... for the 'cars' in my garage today. But here's my problem... Suppose I create my client.exe program, and sell millions of copies, and now want to add a Lamborghini, but WITHOUT modifying my program. I have the new car, but there's no code that says 'CreatOpject("Lamboghini.car")
How do I do this? Should I not be using Code Components?
I guess this is also like the world of printers and printer drivers: I anticipate making new driver files to support new printers.. thats no problem. But how do I create a program that allows me to 'install' new printers in the future?
Easy to explain... but I dont know how to implement this flexability.
Thanks for any advice...
bb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|