GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / PdfLaunchAction Event
Example





PdfLaunchAction Event (GdViewer)
This event is raised when a Launch action contained in the displayed PDF document has been triggered to launch an application, usually to open or print a file.

Please check the corresponded GdViewer.PdfLaunchActionEventHandler for given parameters.

Syntax
'Declaration
 
Public Event PdfLaunchAction As GdViewer.PdfLaunchActionEventHandler
 
Remarks
This event is only meaningful for PDF documents. At the same, this event only handles the Launch action defined in the PDF documents.
Example
How to add and use this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.PdfLaunchAction, AddressOf GdViewer1_PdfLaunchAction
            
'Define the event.
Sub GdViewer1_PdfLaunchAction(ByVal ActionType As PdfActionLaunchOperation, ByRef FilePath As String, ByRef Cancel As Boolean) Handles GdViewer1.PdfLaunchAction
    MessageBox.Show("The operation is: " + ActionType.ToString() + "\nThe filename is: " + FilePath, "GdViewer.PdfLaunchAction")
    'Turning this parameter to True disables automatic handling of the file by the toolkit.
    Cancel = True
    'Now you can handle the action.
    System.Diagnostics.Process.Start(FilePath)
End Sub
See Also