BeforeOpenFile Event - .NET

<< Click to Display Table of Contents >>

Navigation:  Events Generated by the .NET Control >

BeforeOpenFile Event - .NET

Previous pageReturn to chapter overviewNext page

[Not supported by VpeWebControl]

Is fired when the user clicked the Open File button in the toolbar (or pushed the corresponding key).

CancelEventHandler VPE. BeforeOpenFile(

object sender,

System.ComponentModel.CancelEventArgs e

)

object sender

the VPE document object that fired the event

System.ComponentModel.CancelEventArgs e

event data, see .NET documentation

You can set e.Cancel = true if you want to cancel the event, i.e. deny that the file open dialog will be shown. Cancelling the operation allows you to display your own open dialog and to import or create your own document, for example from a database via a memory stream.

Example:

Protected Sub vpe_BeforeOpenFile (sender As Object, e As CancelEventArgs)

 e.Cancel = True

End Sub

 

See also:

OpenFileName