Login  
Search All Forums
Dart Home | PowerTCP Zip Compression for Active | Custom Development Reply | PowerTCP Zip Compression for ActiveX Topics | Forums   
AuthorForum: PowerTCP Zip Compression for ActiveX
Topic: Events and VB declaration
pvestuto

From: Kildeer, IL USA
Posts: 43
Member Since: 07/03/01
posted May 7, 2002 10:28 AM

What is the correct combination of declarations for getting events inside a VB class?

I can declare the instance as follows:
 Private WithEvents mZip As DartZipCtl.Zip

In my class method, I try this to instantiate the object
  Set mZip = CreateObject("Dart.Zip")
or
  Set mZip = CreateObject("Dart.Zip.1")

However, I get a 'type mismatch' error.

I do not use a form to instantiate the instance. I assume there is a way. If I use the NEW keyword, the Zip object isn't avauilable (in Intellisense anyway).

thanks,

 - Paul -
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted May 7, 2002 11:29 AM


Hi Paul,
Yes, you would use New. Please see the following article, taking special note of step 1 (add the dll as a reference, not as a component):
http://support.dart.com/KBDetail.dwp5
and you should be all set.
-ken

K M Drake
Dart Tech Support
tshriver

From: Laurel, MD USA
Posts: 4
Member Since: 03/08/06
posted March 26, 2019 9:10 PM

When I declare the instance as follows:
  Private WithEvents mZip As DartZipCtl.Zip

and then attempt to create the control with
  Set mZip = New DartZipCtl

There is no .Zip option. Hence when I try and run the code I get an error "Expected user-defined type, not project." 

I try and use
  Set mZip = New DartZipCtl.Zip

I get the obvious error "Invalid use of keyword"

I have the DartZip.oca as the top priority reference.

What else need to be done in order to use in a VB Class?

Thanks,

Tim
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted March 28, 2019 2:11 PM

Thank you for your post. It appears the code you may be using is dated. Please try the following, using the current version, and if you still have trouble, please email support@dart.com for additional help.

Add a project reference to 'Dart Zip Control' in VB6 using from the Project-> References menu.

Define your instance with:
Private WithEvents Zip1 As DartZip.Zip

Instantiate with:
Set Zip1 = New DartZip.Zip

Regards,
Jamie

Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted March 28, 2019 2:14 PM

Hello,

Please also ensure your project is referencing DartZip.dll, not (for example) DartZip.oca.
tshriver

From: Laurel, MD USA
Posts: 4
Member Since: 03/08/06
posted March 31, 2019 4:04 PM

The issue was the reference... I changed it from .oca to .dll and that took care of the issue.

Thank you!
Reply | PowerTCP Zip Compression for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX