Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2007, 04:26 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default ActiveX DLL


I'm about to create a program using VB6 that will open D1 of printer port...
Can someone help me out with this one, thanks in advance!
I don't have any idea in programming activeX DLL...
 
Old January 24th, 2007, 12:09 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am a bit unclear as to what you actually need help with.

You are currently programming in VB6, but you have never programmed an ActiveX Dll?

What about this do you need help with?

Woody Z
http://www.learntoprogramnow.com
 
Old January 24th, 2007, 08:02 PM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes i know how to program using VB6 but my knowledge is not that broad yet, and i need to know how to program activex dll to turn on the D1 of the port....

 
Old January 24th, 2007, 08:43 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is easy to create a ActiveX dll project.

When you create a project in VB6, select the ActiveX Dll project type in the New Project dialog. This will create an application with a single class in it.

Name your class whatever you want. You will need some public methods (properties, subs and/or functions) to expose the functionality you need.
This class will have its instancing property set to Multiuse by default. This is typically the setting you will want for this. This allows other applications which reference your dll to be able to use the public methods.

Within the class you will place your code for "opening D1 of printer port". I am not sure what that means.

An excellent book on writing ActiveX components is Dan Appleman's Developing COM/ActiveX Components With Visual Basic 6 (Paperback). This book is only available used, but you can get it for about $1 US in the United States at places like half.com or amazon. I highly recommend you get this book if your main issue is how to write ActiveX components.

As far as working with the printer - that is another issue. What exactly do you mean "Open D1 of Printer Port"? A good place for parallel port info is Jan Axelson: http://www.lvr.com/parport.htm



Woody Z
http://www.learntoprogramnow.com
 
Old January 25th, 2007, 01:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

maybe D1 is the bit 1 of the output port?

But I do not understand why this should be in an ActiveX. Can't just be in a standard executable?

Marco

PS: that book of Appleman is the only one left in my shelf... nothing like that!

"There are two ways to write error-free programs. Only the third one works."
Unknown
 
Old January 25th, 2007, 08:22 PM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes sir, D1 is the bit1 of the printer port...
There's an existing program that compares inputs from 2 databases... When it is true then the door will open. To open the turnstile door, my team leader told me that I need to turn on bit1 of the printer port...
Thanks guys!

 
Old January 25th, 2007, 08:50 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not to sway to far from the topic, but to give Appleman another boost: I bought 3 copies of this book over the years because it walked off from my desk. That has got to be a good recommendation for the book.

Regarding the parallel port issue, most of my port experience has been the serial port - and a lot of what I know about that came from Jan's Serial Port Complete book.

At her site you can download the code from the books and that might be enough to get you going.

Woody Z
http://www.learntoprogramnow.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Advantages /Disadvantages of ActiveX DLL & ActiveX priyank Beginning VB 6 6 February 19th, 2007 11:34 AM
Using ActiveX DLL in ASP Andraw Classic ASP Basics 13 January 22nd, 2007 06:07 AM
creating an activex dll amc VB Components 7 June 25th, 2004 05:10 PM
Create an ActiveX DLL .... miglou VS.NET 2002/2003 1 September 23rd, 2003 08:43 AM
Distribution of ActiveX DLL james gold Pro VB 6 6 September 10th, 2003 11:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.