Back to product page

PrintStart event


Fires when application wants to start printing data.

Syntax

  • Basic
Private Sub object_PrintStart ()

Remarks

This event is only available in OCX (GUI) version of the component.

PrintStart event is fired when application running on remote server uses so called 'slave printing' or 'transparent printing', informing the client (us) that we should print some data. Typically, this is ANSI command for interaction between remote server and local printer.

Implementation is pretty straightforward - when such request is received from the server, this event is fired. All data that's coming at this point is not shown in wodTelnetDLX window. It is provided to you through PrintData event.

At this point, you should decide what to do with incoming data. Usually, this will be text only data you should just forward to your default printer, but you can also save it to file, show in notepad etc.. When printing is done, PrintEnd event will be fired and wodTelnetDLX will continue to write data to screen. Typically, if you want to handle printing in your applications, you can add code like this:
 
Private Sub wodTelnetDLX1_PrintData(ByVal Text As String)
 Printer.Print Text;
 Debug.Print Text;
End Sub
Private Sub wodTelnetDLX1_PrintEnd()
 Printer.EndDoc
 Debug.Print vbCrLf & "End printing"
End Sub
Private Sub wodTelnetDLX1_PrintStart()
 Debug.Print "Start printing" & vbCrLf
End Sub
 

and remote text will be printed on your default printer device.

Platforms

Windows