GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / PrintDialogFit Method / PrintDialogFit(Int32,IWin32Window) Method
A unique image identifier of the GdPicture image representing the image in use.
Represents the top-level window that will own the modal dialog box.
Example





In This Topic
PrintDialogFit(Int32,IWin32Window) Method
In This Topic
Invokes the standard Windows Print dialog box, which allows you to select additional options or settings and then to print the specified GdPicture image adjusting the picture size to the default paper size. This method also allows to specify the top-level window that will own the modal dialog box.
Syntax
'Declaration
 
Public Overloads Function PrintDialogFit( _
   ByVal ImageID As Integer, _
   ByVal owner As IWin32Window _
) As Boolean
public bool PrintDialogFit( 
   int ImageID,
   IWin32Window owner
)
public function PrintDialogFit( 
    ImageID: Integer;
    owner: IWin32Window
): Boolean; 
public function PrintDialogFit( 
   ImageID : int,
   owner : IWin32Window
) : boolean;
public: bool PrintDialogFit( 
   int ImageID,
   IWin32Window* owner
) 
public:
bool PrintDialogFit( 
   int ImageID,
   IWin32Window^ owner
) 

Parameters

ImageID
A unique image identifier of the GdPicture image representing the image in use.
owner
Represents the top-level window that will own the modal dialog box.

Return Value

true if the method has been followed successfully, otherwise false. Please use the PrintGetStat method to determine the reason for the printing failure.
Example
Printing an image with the help of standard Windows Printer Dialog.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    // Open an image file. An empty string allows the control to prompt for selecting a file.
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("");
 
    gdpictureImaging.PrintDialogFit(imageID, this);
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also