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