Dim caption As String = "Example: PrintGetPrintersCount"
Using gdpicturePDF As New GdPicturePDF()
Dim PrintersCount As Integer = gdpicturePDF.PrintGetPrintersCount()
If gdpicturePDF.GetStat() = GdPictureStatus.OK Then
Dim CurPrinter As String = gdpicturePDF.PrintGetActivePrinter()
If gdpicturePDF.GetStat() = GdPictureStatus.OK Then
MessageBox.Show("The number of available printers: " + PrintersCount.ToString() + vbCrLf +
"The currently active printer is: " + CurPrinter, caption)
Else
MessageBox.Show("The PrintGetActivePrinter() method has failed with the status: " + gdpicturePDF.PrintGetStat(), caption)
End If
Else
MessageBox.Show("The PrintGetPrintersCount() method has failed with the status: " + gdpicturePDF.PrintGetStat(), caption)
End If
End Using
string caption = "Example: PrintGetPrintersCount";
using (GdPicturePDF gdpicturePDF = new GdPicturePDF())
{
int PrintersCount = gdpicturePDF.PrintGetPrintersCount();
if (gdpicturePDF.GetStat() == GdPictureStatus.OK)
{
string CurPrinter = gdpicturePDF.PrintGetActivePrinter();
if (gdpicturePDF.GetStat() == GdPictureStatus.OK)
MessageBox.Show("The number of available printers: " + PrintersCount.ToString() +
"\nThe currently active printer is: " + CurPrinter, caption);
else
MessageBox.Show("The PrintGetActivePrinter() method has failed with the status: " + gdpicturePDF.PrintGetStat(), caption);
}
else
MessageBox.Show("The PrintGetPrintersCount() method has failed with the status: " + gdpicturePDF.PrintGetStat(), caption);
}