PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.4.8 Assembly / C1.Win.C1Preview Namespace / C1PreviewPane Class / FileOpen Method / FileOpen(String) Method
The name of the file to load, or the initial directory for the file open dialog.

In This Topic
    FileOpen(String) Method
    In This Topic
    Loads the specified file (which must be a valid C1DX, C1D or C1MDX document) into the current preview pane.

    If fileName does not exist or is a directory, shows the file open dialog and allows the user to select a file to load. In that case fileName specifies the initial directory for the dialog.

    Syntax
    'Declaration
     
    Public Overloads Function FileOpen( _
       ByVal fileName As String _
    ) As Boolean
    public bool FileOpen( 
       string fileName
    )

    Parameters

    fileName
    The name of the file to load, or the initial directory for the file open dialog.

    Return Value

    true if the file was successfully loaded, false if an error occurred or the user cancelled the dialog.
    Remarks
    If a handler is assigned to the Error event, that handler is invoked but no message is shown to the user.
    See Also