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.
Specifies the x-coordinate (in inches) of the upper-left corner of the provided GdPicture image into the paper.
Specifies the y-coordinate (in inches) of the upper-left corner of the provided GdPicture image into the paper.
Specifies the width (in inches) of the provided GdPicture image into the paper.
Specifies the height (in inches) of the provided GdPicture image into the paper.
Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / PrintDialogBySize Method / PrintDialogBySize(Int32,IWin32Window,Single,Single,Single,Single) Method

PrintDialogBySize(Int32,IWin32Window,Single,Single,Single,Single) 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 with the defined size and the position. This method also allows to specify the top-level window that will own the modal dialog box.
Syntax
'Declaration
 
Public Overloads Function PrintDialogBySize( _
   ByVal ImageID As Integer, _
   ByVal owner As IWin32Window, _
   ByVal DstLeft As Single, _
   ByVal DstTop As Single, _
   ByVal Width As Single, _
   ByVal Height As Single _
) As Boolean
public bool PrintDialogBySize( 
   int ImageID,
   IWin32Window owner,
   float DstLeft,
   float DstTop,
   float Width,
   float Height
)
public function PrintDialogBySize( 
    ImageID: Integer;
    owner: IWin32Window;
    DstLeft: Single;
    DstTop: Single;
    Width: Single;
    Height: Single
): Boolean; 
public function PrintDialogBySize( 
   ImageID : int,
   owner : IWin32Window,
   DstLeft : float,
   DstTop : float,
   Width : float,
   Height : float
) : boolean;
public: bool PrintDialogBySize( 
   int ImageID,
   IWin32Window* owner,
   float DstLeft,
   float DstTop,
   float Width,
   float Height
) 
public:
bool PrintDialogBySize( 
   int ImageID,
   IWin32Window^ owner,
   float DstLeft,
   float DstTop,
   float Width,
   float Height
) 

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.
DstLeft
Specifies the x-coordinate (in inches) of the upper-left corner of the provided GdPicture image into the paper.
DstTop
Specifies the y-coordinate (in inches) of the upper-left corner of the provided GdPicture image into the paper.
Width
Specifies the width (in inches) of the provided GdPicture image into the paper.
Height
Specifies the height (in inches) of the provided GdPicture image into the paper.

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 a portion of 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("");
 
    float dstLeft = 2, dstTop = 2;
    float width = 10, height = 50;
 
    gdpictureImaging.PrintDialogBySize(imageID, this, dstLeft, dstTop, width, height);
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also