CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Location
    Kathmandu, Nepal
    Posts
    84

    Question Troubleshooting printers

    Hi
    I want to test whether there's a printer installed or not before I print the report. If not I should inform the particular user about the condition without resulting an error.
    How's it is possible?

  2. #2
    Join Date
    Sep 2003
    Location
    Sri Lanka
    Posts
    64
    try following code

    Code:
    Private Sub Command1_Click()
        
        If Printer.DeviceName = "" Then
            MsgBox "No default printer is installed"
            Exit Sub
        End If
        
        'Printing can continue
        ' Code here
        
    End Sub
    http://www.freewebs.com/dineshns

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured