Problem with Lexmark printer/driver ?

The program I'm working on allows the user to do some printing.
It works fine with my Epson R220.
One of my users is having problems with his new Lexmark Z617 (print preview is blank except for 1 black pixel in the centre and page setup dialog is blank!) but it works fine with his old Epson 600.

I installed the Lexmark driver and tried my software.
I got the same results as my user ie. no good.
I installed several other printer drivers and my software works fine.

Looking through the help (and thinking there must be something wrong with my code) I found this and tried it:

Public Class Form1
'This method displays a PageSetupDialog object. If the user clicks OK in the dialog, selected results of
' the dialog are displayed in ListBox1.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
' Initialize the dialog's PrinterSettings property to hold user defined printer settings.

PageSetupDialog1.PageSettings = New System.Drawing.Printing.PageSettings

' Initialize dialog's PrinterSettings property to hold user

' set printer settings.

PageSetupDialog1.PrinterSettings = New System.Drawing.Printing.PrinterSettings

'Do not show the network in the printer dialog.

PageSetupDialog1.ShowNetwork = False

'Show the dialog storing the result.

Dim result As DialogResult = PageSetupDialog1.ShowDialog()

' If the result is OK, display selected settings in

' ListBox1. These values can be used when printing the

' document.

If (result = Windows.Forms.DialogResult.OK) Then

Dim results() As Object = New Object() _

{PageSetupDialog1.PrinterSettings.PrinterName, _

PageSetupDialog1.PageSettings.Margins, _

PageSetupDialog1.PageSettings.PaperSize, _

PageSetupDialog1.PageSettings.Landscape, _

PageSetupDialog1.PageSettings.Bounds, _

PageSetupDialog1.PageSettings.HardMarginX, _

PageSetupDialog1.PageSettings.HardMarginY, _

PageSetupDialog1.PageSettings.PaperSource, _

PageSetupDialog1.PageSettings.PrintableArea, _

PageSetupDialog1.PageSettings.PrinterResolution, _

PageSetupDialog1.PageSettings.PrinterSettings, _

PageSetupDialog1.PrinterSettings.PrintRange, _

PageSetupDialog1.PrinterSettings.IsDefaultPrinter, _

PageSetupDialog1.PrinterSettings.PaperSizes.Count}

ListBox1.Items.AddRange(results)

End If

Catch ex As Exception

MsgBox(ex.Message, MsgBoxStyle.OkOnly)

End Try

End Sub

End Class

Clicking Button1 brings up a page setup dialog, clicking OK on the dialog lists some of the settings of the printer in a ListBox.
Strange thing is, the above works with the Lexmark when run from the IDE but if I Publish it and then install it, when I click Button1 the software just closes with no error message or anything. Works fine with any other printer.
My own app. also works ok with the Lexmark when I run it from the IDE.

Does anyone have any idea why they fail with the Lexmark Is it the printer driver Why do they work when run from the IDE but not when installed using Click-Once

I'm Confused



Answer this question

Problem with Lexmark printer/driver ?

  • Ben Zamora

    Well it's been a while and I know there are a lot of Lexmark owners out there so I just wondered if anyone else has come across this Surely there must be some programmers out there with Lexmark's. Does your's work correctly with the apps you write

    There is a workaround - I found that if I move the installation folder from the original location (C:\Documents and Settings\<your user name>\Local Settings\Apps\2.0\....) to a different location - desktop, program files, etc. - that it seems to work. Downside of this is you have to run it by clicking the .exe in the folder, it won't work if you use the shortcut on the Start menu.


  • SharpCarp

    Anyone have any ideas
  • Rick X

    Wondered if anyone had any more thoughts on this.
    I don't have enough knowledge of VB to find the cause by myself so if anyone can help then please do...


  • Garg Umesh

    I never tried this but maybe, it's a security problem... Because when you said it works from IDE but not from a Published App, that would tell me that there's something wrong with the security. Well, does the app work from IDE for the "Z-blah" model

    Keehun



  • vaghelabhavesh

    Yes it works from the IDE.
    Any ideas about the security settings Where to look/what to look for

  • Ash31

    Thanks for posting.

    Not sure whether it applies to my situation though, the printer is working ok in other apps (word proc. etc.) but not with my VB app. It's not even showing up in the PageSetupDialog


  • GedMarc

    The only article I could find on problems with this printer.

    http://www.ureader.com/message/3625234.aspx



  • Problem with Lexmark printer/driver ?