I am using Visual Studio 2008 sp1 - VB.Net

I have been working on an application for a while now that has printing for each of roughly 30 forms. All the printing up to now has been with text only, so no need to worry about color ink. I was just recently told to add our company logo in gray scale to each of the forms.

I have added the logo successfully, however I cannot force the printing to be done with the black ink cartridge only. The image prints using the color to create the gray scale. However, if I open the logo independently and select gray scale, black ink only, then the printer will output correctly.

Here is the code I have tried using so far to set up printing with the black ink only. I have spent a couple days trying to go through forums to figure out the answer and no luck.

- I first started off trying to set the color printing after the print dialog is selected. I ended up finding out that it was not carrying over to the print page event.

Private Sub btnPEPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
If Me.PrintDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
PrintDocument1.OriginAtMargins = False
PrintDocument1.DefaultPageSettings.Landscape = False
PrintDocument1.PrinterSettings.PrinterName = Me.PrintDialog1.PrinterSettings.PrinterName
PrintDocument1.DefaultPageSettings.Color = False
PrintDocument1.PrinterSettings.DefaultPageSettings .Color = False
End If
End Sub

- I found a couple of forum posts that suggested setting the color= false in the print page event, but when I tried it, I got the same thing.

Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.PageSettings.Color = False
e.PageSettings.PrinterSettings.DefaultPageSettings .Color = False

I am looking to set it to print with the black ink cartridge only, which I can do from a normal print dialog with the logo, but cannot seem to get to work right when I am printing the same logo in my code. Any help would be appreciated

The image is already in gray scale. The problem is getting the printer settings to use only the black ink. The printer is using the tri-color ink cartridge to print in gray scale, instead of using the black ink cartridge.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.