Redirect printing VB sample code

Example requests (Development Tools) including source code requests

Moderator: Technical Support Team

Redirect printing VB sample code

Postby Chintaka » Tue Oct 19, 2004 11:44 am

Hello, I am trying to control redirect priting with VB. Mu program is changing printer destination automatically. I tried using DEVMODE and added the follwoing code in VB.

Private Sub SetUpPrinting()
Dim iHandle As Long
iHandle = Form1.BlackIceDEVMODE1.LoadBlackIceDEVMODE("Dilbert")
If Not Form1.BlackIceDEVMODE1.IsRedirectPrintingEnabled(iHandle) Then
Form1.BlackIceDEVMODE1.EnableRedirectPrinting iHandle
End If

If Form1.BlackIceDEVMODE1.EnableRedirectPrinting(iHandle) Then
If Form1.BlackIceDEVMODE1.SetRedirectPrintingPrinterName("Dilbert", iHandle) Then
Form1.BlackIceDEVMODE1.SaveBlackIceDEVMODE "Dilbert", iHandle
MsgBox Form1.BlackIceDEVMODE1.GetRedirectPrintingPrinterName(iHandle)
End If

End If
Form1.BlackIceDEVMODE1.ReleaseBlackIceDEVMODE iHandle
End Sub

this doesnot seem to work .

Please provide me a VB sample

Thanks ,

Chintaka
Chintaka
 
Posts: 2
Joined: Tue Oct 19, 2004 11:38 am

I fixed the problem

Postby Chintaka » Tue Oct 19, 2004 5:46 pm

iHandle = Form1.BlackIceDEVMODE1.LoadBlackIceDEVMODE("Dilbert")
I replaced above printer with "Black Ice Printer" . I am redirecting black Ice printer , So I need to load the Back Ice printer config
Chintaka
 
Posts: 2
Joined: Tue Oct 19, 2004 11:38 am


Return to Example requests



Who is online

Users browsing this forum: No registered users and 0 guests

cron