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 As Integer, _
ByVal As IWin32Window, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single _
) As Boolean
public bool PrintDialogBySize(
int ,
IWin32Window ,
float ,
float ,
float ,
float
)
public function PrintDialogBySize(
: Integer;
: IWin32Window;
: Single;
: Single;
: Single;
: Single
): Boolean;
public function PrintDialogBySize(
: int,
: IWin32Window,
: float,
: float,
: float,
: float
) : boolean;
public: bool PrintDialogBySize(
int ,
IWin32Window* ,
float ,
float ,
float ,
float
)
public:
bool PrintDialogBySize(
int ,
IWin32Window^ ,
float ,
float ,
float ,
float
)
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
GdPictureImaging.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);
}
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