S
Steve Tuckner
This is a multi-part message in MIME format.
------=_NextPart_000_0318_01C344AB.6131DCE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello all,
I am trying to use Win32OLE to control a windows printer driver that
will be used to capture the printer output from applications to create
TIFF files. Below is my long winded explanation of what I am trying to
do. Any ideas at all would be welcome.
Thanks,
Steve Tuckner
Using the nifty Simple OLE browser from the WIN32OLE web page, I was
able to learn that this driver has three "interfaces" to play with.
They are:
BiPrnDrv
Abort
AboutBox
EndDoc
--------------------------- (what EndDoc output looks like)
Class BiPrnDrv
GUID : {E5B71FF3-4946-4DCC-863E-F16B8F864A66}
PROGID : BIPRNDRV.BiPrnDrvCtrl.1
DESCRIPTION : Black Ice Message Capture Control
Event FUNC VOID EndDoc
Dispatch ID : 3
DESCRIPTION :
arg1 - BSTR GroupFileName []
Event Interface : _DBiPrnDrvEvents
-----------------------------
InitCapture
StarDoc
StartPage
_DBiPrnDrv
AboutBox
GetIDsOfNames
GetTypeInfo
GetTypeInfoCount
InitCapture
Invoke
PrinterName
----------------------------- (What PrinterName entry looks like)
Dispatch _DBiPrnDrv
GUID : {8FE2BEA5-0F7F-4758-B6A4-68F86C74AA2D}
PROGID :
DESCRIPTION : Dispatch interface for BiPrnDrv Control
DISPATCH BSTR PrinterName
-----------------------------
UseCopyData
_DBiPrnDrvEvents
Abort
EndDoc
----------------------------- (What EndDoc looks like)
Dispatch _DBiPrnDrvEvents
GUID : {68E14ECB-14D9-4C9D-9470-C05348FED4CC}
PROGID :
DESCRIPTION : Event interface for BiPrnDrv Control
FUNC VOID EndDoc
Dispatch ID : 3
DESCRIPTION :
arg1 - BSTR GroupFileName []
-----------------------------
EndPage
GetIDsOfNames
GetTypeInfo
GetTypeInfoCount
Invoke
StartDoc
StartPage
Below is my code to try and get the printing events to be noticed by me.
They have very little doc (the vendor I got it from on the interface,
but do have sample code in VB and Delphi. Even so I have not be able to
get it to work. I can get the AboutBox to come up so that much works.
Below is my Ruby code and below that is the example VB code. I don't
know much about OLE but I have done some scripting of Outlook. I am
completely new to OLE events. Any ideas at all would be welcome on where
I should go from here (aside from talking to the vendor I acquired this
driver from who has probably never heard of Ruby before). I also tried
setting the printer name but that seemed to have no effect. I don't
understand the difference between the first two interfaces or how it was
even possible to set the PrinterName against the first interface when it
is part of the second.
-----------------------------------------------------------------------
(My ruby code)
require "win32ole"
printer = WIN32OLE.new("BIPRNDRV.BiPrnDrvCtrl.1")
ev = WIN32OLE_EVENT.new(printer, "_DBiPrnDrvEvents")
ev.on_event {|*args| print "default handler\n"}
ev.on_event("StartDoc") { print "in start doc\n"}
ev.on_event("StartPage") {|page_num| print "printing page
#{page_num}\n"}
ev.on_event("EndDoc") { print "in end doc\n"}
ev.on_event("EndPage") { print "in end page\n"}
while true
WIN32OLE_EVENT.message_loop
end
-----------------------------------------------------------------------
(VB sample code)
VERSION 5.00
Object = "{6ADA10EC-D372-4FE7-863C-BA84E3B89F76}#1.0#0"; "BIPRNDRV.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
BorderStyle = 3 'Fixed Dialog
Caption = "Message capture sample"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
Icon = "BiCapture.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Exit
Cancel = -1 'True
Caption = "E&xit"
Height = 375
Left = 1320
TabIndex = 5
Top = 2640
Width = 1815
End
Begin VB.ListBox List1
Height = 1425
ItemData = "BiCapture.frx":030A
Left = 120
List = "BiCapture.frx":030C
TabIndex = 4
Top = 960
Width = 4455
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 120
Top = 2640
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Frame Frame1
Caption = "Current Printer"
Height = 735
Left = 120
TabIndex = 1
Top = 120
Width = 4455
Begin VB.CommandButton ChangePrinter
Caption = "Change Printer"
Height = 375
Left = 3000
TabIndex = 2
Top = 240
Width = 1215
End
Begin VB.Label CurrentPrinter
Height = 255
Left = 240
TabIndex = 3
Top = 360
Width = 2535
End
End
Begin BIPRNDRVLib.BiPrnDrv BiPrnDrv1
Height = 615
Left = 3960
TabIndex = 0
Top = 2520
Width = 615
_Version = 65536
_ExtentX = 1085
_ExtentY = 1085
_StockProps = 0
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub BiPrnDrv1_EndDoc(ByVal GroupFileName As String)
List1.AddItem "EndDoc message was received."
List1.AddItem "The Group File is: " & GroupFileName
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub BiPrnDrv1_EndPage(ByVal ImageFileName As String)
List1.AddItem "EndPage message was received."
List1.AddItem "The Image File is:" & ImageFileName
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub BiPrnDrv1_StarDoc(ByVal GroupFileName As String)
List1.AddItem "StartDoc message was received."
List1.AddItem "The Group File is: " & GroupFileName
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub BiPrnDrv1_StartPage(ByVal PageNumber As Long)
List1.AddItem "StartPage message was received."
List1.AddItem "The current page number is: " & Str(PageNumber)
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub ChangePrinter_Click()
CommonDialog1.ShowPrinter
BiPrnDrv1.PrinterName = Printer.DeviceName
CurrentPrinter.Caption = Printer.DeviceName
List1.AddItem "Please print with the " & BiPrnDrv1.PrinterName & "
printer."
End Sub
Private Sub Exit_Click()
Unload Form1
End Sub
Private Sub Form_Load()
BiPrnDrv1.PrinterName = "Black Ice Color"
CurrentPrinter.Caption = "Black Ice Color"
List1.AddItem "Please print with the " & BiPrnDrv1.PrinterName & "
printer."
End Sub
------=_NextPart_000_0318_01C344AB.6131DCE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Hello =
all,</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>I am =
trying to use=20
Win32OLE to control a windows printer driver that will be used to =
capture the=20
printer output from applications to create TIFF files. Below is my long =
winded=20
explanation of what I am trying to do. Any ideas at all would be=20
welcome.</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Steve =
Tuckner</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Using =
the nifty=20
Simple OLE browser from the WIN32OLE web page, I was able to learn that =
this=20
driver has three "interfaces" to play with.</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>They=20
are:</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>BiPrnDrv</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
Abort</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
AboutBox</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
EndDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>--------------------------- (what EndDoc output looks=20
like)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Class =20
BiPrnDrv<BR> GUID : =
{E5B71FF3-4946-4DCC-863E-F16B8F864A66}<BR> =20
PROGID : BIPRNDRV.BiPrnDrvCtrl.1<BR> DESCRIPTION : Black Ice =
Message=20
Capture Control</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Event =
FUNC VOID=20
EndDoc<BR> Dispatch ID : 3<BR> DESCRIPTION : <BR> =
arg1 - BSTR=20
GroupFileName []</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> Event=20
Interface :=20
_DBiPrnDrvEvents<BR>-----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
InitCapture</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
StarDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> StartPage</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>_DBiPrnDrv</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
AboutBox</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> GetIDsOfNames</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfo</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfoCount</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
InitCapture</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
Invoke</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
PrinterName</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>----------------------------- (What PrinterName entry looks=20
like)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Dispatch =20
_DBiPrnDrv<BR> GUID : =
{8FE2BEA5-0F7F-4758-B6A4-68F86C74AA2D}<BR> =20
PROGID : <BR> DESCRIPTION : Dispatch interface for BiPrnDrv=20
Control</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV><SPAN =
class=3D098260022-07072003>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><BR><FONT=20
face=3DArial size=3D2> DISPATCH BSTR PrinterName</FONT></DIV>
<DIV></SPAN><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>-----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
UseCopyData</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>_DBiPrnDrvEvents</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
Abort</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
EndDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>----------------------------- (What EndDoc looks=20
like)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Dispatch =20
_DBiPrnDrvEvents<BR> GUID :=20
{68E14ECB-14D9-4C9D-9470-C05348FED4CC}<BR> PROGID : <BR> =
DESCRIPTION=20
: Event interface for BiPrnDrv Control</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>FUNC =
VOID=20
EndDoc<BR> Dispatch ID : 3<BR> DESCRIPTION : <BR> =
arg1 - BSTR=20
GroupFileName []<BR></FONT></SPAN><SPAN =
class=3D098260022-07072003><FONT=20
face=3DArial size=3D2>-----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
EndPage</FONT></SPAN></DIV><SPAN class=3D098260022-07072003>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> GetIDsOfNames</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfo</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfoCount</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2> Invoke</FONT></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
StartDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
StartPage</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Below =
is my code to=20
try and get the printing events to be noticed by me. They have =
very little=20
doc (the vendor I got it from on the interface, but do have sample code =
in VB=20
and Delphi. Even so I have not be able to get it to work. I can get the =
AboutBox=20
to come up so that much works. Below is my Ruby code and below that is =
the=20
example VB code. I don't know much about OLE but I have done some =
scripting of=20
Outlook. I am completely new to OLE events. Any ideas at all would be =
welcome on=20
where I should go from here (aside from talking to the vendor I =
acquired this=20
driver from who has probably never heard of Ruby before). I also tried =
setting=20
the printer name but that seemed to have no effect. I don't understand =
the=20
difference between the first two interfaces or how it was even possible =
to set=20
the PrinterName against the first interface when it is part of the=20
second.</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>---------------------------------------------------------------=
--------=20
(My ruby code)</FONT></SPAN></DIV></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>require=20
"win32ole"</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>printer =3D=20
WIN32OLE.new("BIPRNDRV.BiPrnDrvCtrl.1")<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>ev =
=3D=20
WIN32OLE_EVENT.new(printer, "_DBiPrnDrvEvents")<BR>ev.on_event {|*args| =
print=20
"default handler\n"}<BR>ev.on_event("StartDoc") { print "in start=20
doc\n"}<BR>ev.on_event("StartPage") {|page_num| print "printing page=20
#{page_num}\n"}<BR>ev.on_event("EndDoc") { print "in end=20
doc\n"}<BR>ev.on_event("EndPage") { print "in end =
page\n"}</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>while =
true<BR> =20
WIN32OLE_EVENT.message_loop <BR>end<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>---------------------------------------------------------------=
--------=20
(VB sample code)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>VERSION=20
5.00<BR>Object =3D "{6ADA10EC-D372-4FE7-863C-BA84E3B89F76}#1.0#0";=20
"BIPRNDRV.OCX"<BR>Object =3D =
"{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0";=20
"COMDLG32.OCX"<BR>Begin VB.Form Form1 <BR> =20
BorderStyle =3D 3 'Fixed=20
Dialog<BR> =
Caption =20
=3D "Message capture sample"<BR> =20
ClientHeight =3D 3195<BR> =20
ClientLeft =3D =
45<BR> =20
ClientTop =3D =
330<BR> =20
ClientWidth =3D =
4680<BR> =20
Icon =20
=3D "BiCapture.frx":0000<BR> =20
LinkTopic =3D =20
"Form1"<BR> MaxButton =20
=3D 0 'False<BR> =20
MinButton =3D =
0 =20
'False<BR> ScaleHeight =
=3D =20
3195<BR> ScaleWidth =
=3D =20
4680<BR> ShowInTaskbar =3D =
0 =20
'False<BR> StartUpPosition =3D 3 'Windows =
Default<BR> Begin VB.CommandButton Exit=20
<BR> =20
Cancel =
=3D =20
-1 'True<BR> =20
Caption =3D =
"E&xit"<BR> =20
Height =
=3D =20
375<BR> =20
Left =20
=3D 1320<BR> =20
TabIndex =3D =20
5<BR> =20
Top &nb=
sp;=20
=3D 2640<BR> =20
Width =
=3D =20
1815<BR> End<BR> Begin VB.ListBox List1=20
<BR> =20
Height =
=3D =20
1425<BR> =20
ItemData =3D =20
"BiCapture.frx":030A<BR> =20
Left =20
=3D 120<BR> =20
List =20
=3D "BiCapture.frx":030C<BR> =20
TabIndex =3D =20
4<BR> =20
Top &nb=
sp;=20
=3D 960<BR> =20
Width =
=3D =20
4455<BR> End<BR> Begin MSComDlg.CommonDialog=20
CommonDialog1 <BR> =20
Left =20
=3D 120<BR> =20
Top &nb=
sp;=20
=3D 2640<BR> =20
_ExtentX =3D =20
847<BR> =20
_ExtentY =3D =20
847<BR> =20
_Version =3D =20
393216<BR> End<BR> Begin VB.Frame Frame1=20
<BR> =20
Caption =3D =
"Current=20
Printer"<BR> =20
Height =
=3D =20
735<BR> =20
Left =20
=3D 120<BR> =20
TabIndex =3D =20
1<BR> =20
Top &nb=
sp;=20
=3D 120<BR> =20
Width =
=3D =20
4455<BR> Begin VB.CommandButton =
ChangePrinter=20
<BR> =20
Caption =3D =
"Change=20
Printer"<BR> =20
Height =
=3D =20
375<BR> =20
Left =20
=3D =
3000<BR> =20
TabIndex =3D =20
2<BR> =20
Top &nb=
sp;=20
=3D 240<BR> =
Width =
=3D =20
1215<BR> =
End<BR> =20
Begin VB.Label CurrentPrinter=20
<BR> =20
Height =
=3D =20
255<BR> =20
Left =20
=3D 240<BR> =
TabIndex =3D =20
3<BR> =20
Top &nb=
sp;=20
=3D 360<BR> =
Width =
=3D =20
2535<BR> End<BR> =
End<BR> =20
Begin BIPRNDRVLib.BiPrnDrv BiPrnDrv1 <BR> =
Height =
=3D =20
615<BR> =20
Left =20
=3D 3960<BR> =20
TabIndex =3D =20
0<BR> =20
Top &nb=
sp;=20
=3D 2520<BR> =20
Width =
=3D =20
615<BR> =20
_Version =3D =20
65536<BR> =20
_ExtentX =3D =20
1085<BR> =20
_ExtentY =3D =20
1085<BR> =
_StockProps =20
=3D 0<BR> End<BR>End<BR>Attribute VB_Name =3D=20
"Form1"<BR>Attribute VB_GlobalNameSpace =3D False<BR>Attribute =
VB_Creatable =3D=20
False<BR>Attribute VB_PredeclaredId =3D True<BR>Attribute VB_Exposed =
=3D=20
False</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_EndDoc(ByVal GroupFileName As String)<BR>List1.AddItem =
"EndDoc message=20
was received."<BR>List1.AddItem "The Group File is: " &=20
GroupFileName<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_EndPage(ByVal ImageFileName As String)<BR>List1.AddItem =
"EndPage=20
message was received."<BR>List1.AddItem "The Image File is:" &=20
ImageFileName<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_StarDoc(ByVal GroupFileName As String)<BR>List1.AddItem =
"StartDoc=20
message was received."<BR>List1.AddItem "The Group File is: " &=20
GroupFileName<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_StartPage(ByVal PageNumber As Long)<BR>List1.AddItem =
"StartPage=20
message was received."<BR>List1.AddItem "The current page number is: " =
&=20
Str(PageNumber)<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
ChangePrinter_Click()<BR>CommonDialog1.ShowPrinter<BR>BiPrnDrv1.PrinterN=
ame =3D=20
Printer.DeviceName<BR>CurrentPrinter.Caption =3D=20
Printer.DeviceName<BR>List1.AddItem "Please print with the " &=20
BiPrnDrv1.PrinterName & " printer."<BR>End Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
Exit_Click()<BR>Unload Form1<BR>End Sub</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
Form_Load()<BR>BiPrnDrv1.PrinterName =3D "Black Ice=20
Color"<BR>CurrentPrinter.Caption =3D "Black Ice Color"<BR>List1.AddItem =
"Please=20
print with the " & BiPrnDrv1.PrinterName & " printer."<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> </DIV></FONT></SPAN></SPAN></BODY></HTML>
------=_NextPart_000_0318_01C344AB.6131DCE0--
------=_NextPart_000_0318_01C344AB.6131DCE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello all,
I am trying to use Win32OLE to control a windows printer driver that
will be used to capture the printer output from applications to create
TIFF files. Below is my long winded explanation of what I am trying to
do. Any ideas at all would be welcome.
Thanks,
Steve Tuckner
Using the nifty Simple OLE browser from the WIN32OLE web page, I was
able to learn that this driver has three "interfaces" to play with.
They are:
BiPrnDrv
Abort
AboutBox
EndDoc
--------------------------- (what EndDoc output looks like)
Class BiPrnDrv
GUID : {E5B71FF3-4946-4DCC-863E-F16B8F864A66}
PROGID : BIPRNDRV.BiPrnDrvCtrl.1
DESCRIPTION : Black Ice Message Capture Control
Event FUNC VOID EndDoc
Dispatch ID : 3
DESCRIPTION :
arg1 - BSTR GroupFileName []
Event Interface : _DBiPrnDrvEvents
-----------------------------
InitCapture
StarDoc
StartPage
_DBiPrnDrv
AboutBox
GetIDsOfNames
GetTypeInfo
GetTypeInfoCount
InitCapture
Invoke
PrinterName
----------------------------- (What PrinterName entry looks like)
Dispatch _DBiPrnDrv
GUID : {8FE2BEA5-0F7F-4758-B6A4-68F86C74AA2D}
PROGID :
DESCRIPTION : Dispatch interface for BiPrnDrv Control
DISPATCH BSTR PrinterName
-----------------------------
UseCopyData
_DBiPrnDrvEvents
Abort
EndDoc
----------------------------- (What EndDoc looks like)
Dispatch _DBiPrnDrvEvents
GUID : {68E14ECB-14D9-4C9D-9470-C05348FED4CC}
PROGID :
DESCRIPTION : Event interface for BiPrnDrv Control
FUNC VOID EndDoc
Dispatch ID : 3
DESCRIPTION :
arg1 - BSTR GroupFileName []
-----------------------------
EndPage
GetIDsOfNames
GetTypeInfo
GetTypeInfoCount
Invoke
StartDoc
StartPage
Below is my code to try and get the printing events to be noticed by me.
They have very little doc (the vendor I got it from on the interface,
but do have sample code in VB and Delphi. Even so I have not be able to
get it to work. I can get the AboutBox to come up so that much works.
Below is my Ruby code and below that is the example VB code. I don't
know much about OLE but I have done some scripting of Outlook. I am
completely new to OLE events. Any ideas at all would be welcome on where
I should go from here (aside from talking to the vendor I acquired this
driver from who has probably never heard of Ruby before). I also tried
setting the printer name but that seemed to have no effect. I don't
understand the difference between the first two interfaces or how it was
even possible to set the PrinterName against the first interface when it
is part of the second.
-----------------------------------------------------------------------
(My ruby code)
require "win32ole"
printer = WIN32OLE.new("BIPRNDRV.BiPrnDrvCtrl.1")
ev = WIN32OLE_EVENT.new(printer, "_DBiPrnDrvEvents")
ev.on_event {|*args| print "default handler\n"}
ev.on_event("StartDoc") { print "in start doc\n"}
ev.on_event("StartPage") {|page_num| print "printing page
#{page_num}\n"}
ev.on_event("EndDoc") { print "in end doc\n"}
ev.on_event("EndPage") { print "in end page\n"}
while true
WIN32OLE_EVENT.message_loop
end
-----------------------------------------------------------------------
(VB sample code)
VERSION 5.00
Object = "{6ADA10EC-D372-4FE7-863C-BA84E3B89F76}#1.0#0"; "BIPRNDRV.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
BorderStyle = 3 'Fixed Dialog
Caption = "Message capture sample"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
Icon = "BiCapture.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Exit
Cancel = -1 'True
Caption = "E&xit"
Height = 375
Left = 1320
TabIndex = 5
Top = 2640
Width = 1815
End
Begin VB.ListBox List1
Height = 1425
ItemData = "BiCapture.frx":030A
Left = 120
List = "BiCapture.frx":030C
TabIndex = 4
Top = 960
Width = 4455
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 120
Top = 2640
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Frame Frame1
Caption = "Current Printer"
Height = 735
Left = 120
TabIndex = 1
Top = 120
Width = 4455
Begin VB.CommandButton ChangePrinter
Caption = "Change Printer"
Height = 375
Left = 3000
TabIndex = 2
Top = 240
Width = 1215
End
Begin VB.Label CurrentPrinter
Height = 255
Left = 240
TabIndex = 3
Top = 360
Width = 2535
End
End
Begin BIPRNDRVLib.BiPrnDrv BiPrnDrv1
Height = 615
Left = 3960
TabIndex = 0
Top = 2520
Width = 615
_Version = 65536
_ExtentX = 1085
_ExtentY = 1085
_StockProps = 0
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub BiPrnDrv1_EndDoc(ByVal GroupFileName As String)
List1.AddItem "EndDoc message was received."
List1.AddItem "The Group File is: " & GroupFileName
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub BiPrnDrv1_EndPage(ByVal ImageFileName As String)
List1.AddItem "EndPage message was received."
List1.AddItem "The Image File is:" & ImageFileName
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub BiPrnDrv1_StarDoc(ByVal GroupFileName As String)
List1.AddItem "StartDoc message was received."
List1.AddItem "The Group File is: " & GroupFileName
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub BiPrnDrv1_StartPage(ByVal PageNumber As Long)
List1.AddItem "StartPage message was received."
List1.AddItem "The current page number is: " & Str(PageNumber)
List1.TopIndex = List1.ListCount - 1
End Sub
Private Sub ChangePrinter_Click()
CommonDialog1.ShowPrinter
BiPrnDrv1.PrinterName = Printer.DeviceName
CurrentPrinter.Caption = Printer.DeviceName
List1.AddItem "Please print with the " & BiPrnDrv1.PrinterName & "
printer."
End Sub
Private Sub Exit_Click()
Unload Form1
End Sub
Private Sub Form_Load()
BiPrnDrv1.PrinterName = "Black Ice Color"
CurrentPrinter.Caption = "Black Ice Color"
List1.AddItem "Please print with the " & BiPrnDrv1.PrinterName & "
printer."
End Sub
------=_NextPart_000_0318_01C344AB.6131DCE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Hello =
all,</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>I am =
trying to use=20
Win32OLE to control a windows printer driver that will be used to =
capture the=20
printer output from applications to create TIFF files. Below is my long =
winded=20
explanation of what I am trying to do. Any ideas at all would be=20
welcome.</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Steve =
Tuckner</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Using =
the nifty=20
Simple OLE browser from the WIN32OLE web page, I was able to learn that =
this=20
driver has three "interfaces" to play with.</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>They=20
are:</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>BiPrnDrv</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
Abort</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
AboutBox</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
EndDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>--------------------------- (what EndDoc output looks=20
like)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Class =20
BiPrnDrv<BR> GUID : =
{E5B71FF3-4946-4DCC-863E-F16B8F864A66}<BR> =20
PROGID : BIPRNDRV.BiPrnDrvCtrl.1<BR> DESCRIPTION : Black Ice =
Message=20
Capture Control</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Event =
FUNC VOID=20
EndDoc<BR> Dispatch ID : 3<BR> DESCRIPTION : <BR> =
arg1 - BSTR=20
GroupFileName []</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> Event=20
Interface :=20
_DBiPrnDrvEvents<BR>-----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
InitCapture</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
StarDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> StartPage</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>_DBiPrnDrv</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
AboutBox</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> GetIDsOfNames</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfo</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfoCount</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
InitCapture</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
Invoke</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
PrinterName</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>----------------------------- (What PrinterName entry looks=20
like)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Dispatch =20
_DBiPrnDrv<BR> GUID : =
{8FE2BEA5-0F7F-4758-B6A4-68F86C74AA2D}<BR> =20
PROGID : <BR> DESCRIPTION : Dispatch interface for BiPrnDrv=20
Control</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV><SPAN =
class=3D098260022-07072003>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><BR><FONT=20
face=3DArial size=3D2> DISPATCH BSTR PrinterName</FONT></DIV>
<DIV></SPAN><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>-----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
UseCopyData</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>_DBiPrnDrvEvents</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
Abort</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
EndDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>----------------------------- (What EndDoc looks=20
like)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Dispatch =20
_DBiPrnDrvEvents<BR> GUID :=20
{68E14ECB-14D9-4C9D-9470-C05348FED4CC}<BR> PROGID : <BR> =
DESCRIPTION=20
: Event interface for BiPrnDrv Control</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>FUNC =
VOID=20
EndDoc<BR> Dispatch ID : 3<BR> DESCRIPTION : <BR> =
arg1 - BSTR=20
GroupFileName []<BR></FONT></SPAN><SPAN =
class=3D098260022-07072003><FONT=20
face=3DArial size=3D2>-----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
EndPage</FONT></SPAN></DIV><SPAN class=3D098260022-07072003>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> GetIDsOfNames</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfo</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
GetTypeInfoCount</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2> Invoke</FONT></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
StartDoc</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2> =20
StartPage</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>Below =
is my code to=20
try and get the printing events to be noticed by me. They have =
very little=20
doc (the vendor I got it from on the interface, but do have sample code =
in VB=20
and Delphi. Even so I have not be able to get it to work. I can get the =
AboutBox=20
to come up so that much works. Below is my Ruby code and below that is =
the=20
example VB code. I don't know much about OLE but I have done some =
scripting of=20
Outlook. I am completely new to OLE events. Any ideas at all would be =
welcome on=20
where I should go from here (aside from talking to the vendor I =
acquired this=20
driver from who has probably never heard of Ruby before). I also tried =
setting=20
the printer name but that seemed to have no effect. I don't understand =
the=20
difference between the first two interfaces or how it was even possible =
to set=20
the PrinterName against the first interface when it is part of the=20
second.</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>---------------------------------------------------------------=
--------=20
(My ruby code)</FONT></SPAN></DIV></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>require=20
"win32ole"</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>printer =3D=20
WIN32OLE.new("BIPRNDRV.BiPrnDrvCtrl.1")<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>ev =
=3D=20
WIN32OLE_EVENT.new(printer, "_DBiPrnDrvEvents")<BR>ev.on_event {|*args| =
print=20
"default handler\n"}<BR>ev.on_event("StartDoc") { print "in start=20
doc\n"}<BR>ev.on_event("StartPage") {|page_num| print "printing page=20
#{page_num}\n"}<BR>ev.on_event("EndDoc") { print "in end=20
doc\n"}<BR>ev.on_event("EndPage") { print "in end =
page\n"}</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial size=3D2>while =
true<BR> =20
WIN32OLE_EVENT.message_loop <BR>end<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2>---------------------------------------------------------------=
--------=20
(VB sample code)</FONT></SPAN></DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>VERSION=20
5.00<BR>Object =3D "{6ADA10EC-D372-4FE7-863C-BA84E3B89F76}#1.0#0";=20
"BIPRNDRV.OCX"<BR>Object =3D =
"{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0";=20
"COMDLG32.OCX"<BR>Begin VB.Form Form1 <BR> =20
BorderStyle =3D 3 'Fixed=20
Dialog<BR> =
Caption =20
=3D "Message capture sample"<BR> =20
ClientHeight =3D 3195<BR> =20
ClientLeft =3D =
45<BR> =20
ClientTop =3D =
330<BR> =20
ClientWidth =3D =
4680<BR> =20
Icon =20
=3D "BiCapture.frx":0000<BR> =20
LinkTopic =3D =20
"Form1"<BR> MaxButton =20
=3D 0 'False<BR> =20
MinButton =3D =
0 =20
'False<BR> ScaleHeight =
=3D =20
3195<BR> ScaleWidth =
=3D =20
4680<BR> ShowInTaskbar =3D =
0 =20
'False<BR> StartUpPosition =3D 3 'Windows =
Default<BR> Begin VB.CommandButton Exit=20
<BR> =20
Cancel =
=3D =20
-1 'True<BR> =20
Caption =3D =
"E&xit"<BR> =20
Height =
=3D =20
375<BR> =20
Left =20
=3D 1320<BR> =20
TabIndex =3D =20
5<BR> =20
Top &nb=
sp;=20
=3D 2640<BR> =20
Width =
=3D =20
1815<BR> End<BR> Begin VB.ListBox List1=20
<BR> =20
Height =
=3D =20
1425<BR> =20
ItemData =3D =20
"BiCapture.frx":030A<BR> =20
Left =20
=3D 120<BR> =20
List =20
=3D "BiCapture.frx":030C<BR> =20
TabIndex =3D =20
4<BR> =20
Top &nb=
sp;=20
=3D 960<BR> =20
Width =
=3D =20
4455<BR> End<BR> Begin MSComDlg.CommonDialog=20
CommonDialog1 <BR> =20
Left =20
=3D 120<BR> =20
Top &nb=
sp;=20
=3D 2640<BR> =20
_ExtentX =3D =20
847<BR> =20
_ExtentY =3D =20
847<BR> =20
_Version =3D =20
393216<BR> End<BR> Begin VB.Frame Frame1=20
<BR> =20
Caption =3D =
"Current=20
Printer"<BR> =20
Height =
=3D =20
735<BR> =20
Left =20
=3D 120<BR> =20
TabIndex =3D =20
1<BR> =20
Top &nb=
sp;=20
=3D 120<BR> =20
Width =
=3D =20
4455<BR> Begin VB.CommandButton =
ChangePrinter=20
<BR> =20
Caption =3D =
"Change=20
Printer"<BR> =20
Height =
=3D =20
375<BR> =20
Left =20
=3D =
3000<BR> =20
TabIndex =3D =20
2<BR> =20
Top &nb=
sp;=20
=3D 240<BR> =
Width =
=3D =20
1215<BR> =
End<BR> =20
Begin VB.Label CurrentPrinter=20
<BR> =20
Height =
=3D =20
255<BR> =20
Left =20
=3D 240<BR> =
TabIndex =3D =20
3<BR> =20
Top &nb=
sp;=20
=3D 360<BR> =
Width =
=3D =20
2535<BR> End<BR> =
End<BR> =20
Begin BIPRNDRVLib.BiPrnDrv BiPrnDrv1 <BR> =
Height =
=3D =20
615<BR> =20
Left =20
=3D 3960<BR> =20
TabIndex =3D =20
0<BR> =20
Top &nb=
sp;=20
=3D 2520<BR> =20
Width =
=3D =20
615<BR> =20
_Version =3D =20
65536<BR> =20
_ExtentX =3D =20
1085<BR> =20
_ExtentY =3D =20
1085<BR> =
_StockProps =20
=3D 0<BR> End<BR>End<BR>Attribute VB_Name =3D=20
"Form1"<BR>Attribute VB_GlobalNameSpace =3D False<BR>Attribute =
VB_Creatable =3D=20
False<BR>Attribute VB_PredeclaredId =3D True<BR>Attribute VB_Exposed =
=3D=20
False</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_EndDoc(ByVal GroupFileName As String)<BR>List1.AddItem =
"EndDoc message=20
was received."<BR>List1.AddItem "The Group File is: " &=20
GroupFileName<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_EndPage(ByVal ImageFileName As String)<BR>List1.AddItem =
"EndPage=20
message was received."<BR>List1.AddItem "The Image File is:" &=20
ImageFileName<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_StarDoc(ByVal GroupFileName As String)<BR>List1.AddItem =
"StartDoc=20
message was received."<BR>List1.AddItem "The Group File is: " &=20
GroupFileName<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
BiPrnDrv1_StartPage(ByVal PageNumber As Long)<BR>List1.AddItem =
"StartPage=20
message was received."<BR>List1.AddItem "The current page number is: " =
&=20
Str(PageNumber)<BR>List1.TopIndex =3D List1.ListCount - 1<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
ChangePrinter_Click()<BR>CommonDialog1.ShowPrinter<BR>BiPrnDrv1.PrinterN=
ame =3D=20
Printer.DeviceName<BR>CurrentPrinter.Caption =3D=20
Printer.DeviceName<BR>List1.AddItem "Please print with the " &=20
BiPrnDrv1.PrinterName & " printer."<BR>End Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
Exit_Click()<BR>Unload Form1<BR>End Sub</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial =
size=3D2>Private Sub=20
Form_Load()<BR>BiPrnDrv1.PrinterName =3D "Black Ice=20
Color"<BR>CurrentPrinter.Caption =3D "Black Ice Color"<BR>List1.AddItem =
"Please=20
print with the " & BiPrnDrv1.PrinterName & " printer."<BR>End=20
Sub</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D098260022-07072003><FONT face=3DArial=20
size=3D2> </DIV></FONT></SPAN></SPAN></BODY></HTML>
------=_NextPart_000_0318_01C344AB.6131DCE0--