|
-
May 4th, 2000, 04:29 AM
#1
Thread Starter
Addicted Member
Could someone please tell me the difference using New or CreateObject to create a class object from an Activex exe.
for instance I have class called printers.printclass(Exe) and Letters.Parameters(dll)
then, In the Client code:
Code:
private jdp as Letters.Parameters
Private WithEvents PrintL As Printers.PrintClass
Set PrintL = New Printers.PrintClass
'OR
Set PrintL = CreateObject("Printers.Printclass")
'I just use one of above two lines
'then jdp is created here
PrintL.StartPrint jdp 'call the object method with a parameter
I got an error from last line before starting executing all code, saying "error in loading dll"
So, I would like to clarify the difference between New and CreateObject and If you could give me some leads on the error, that would be great too. Thanks for your help
-
May 4th, 2000, 04:50 AM
#2
If this is your dll, Is the dll correctly registered. vb is suppose to do it for you when you make the dll, but there are a lot of things vb is SUPPOSED to do. "regsrv32 dllname.dll"
-
May 4th, 2000, 03:11 PM
#3
Lively Member
To use the new, you'll have to add the reference if the object has no reference in your project. Where else with Creatobject, you don't have to have a reference. Once the reference is there, you can use the new keyword any where in your project. But for the createobject, as soon as you set it to nothing, you'll need to create the object again.
-
May 4th, 2000, 09:52 PM
#4
Thread Starter
Addicted Member
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
|