Results 1 to 10 of 10

Thread: Supress Driver Dialoge Promt?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Supress Driver Dialoge Promt?

    Hey,

    I am working with a printer, where every time the print command is sent, a prompt pops up asking for a 'filename'

    I am trying to find the best way to hide this from the user, I do not want anything to pop up as it makes the main application unusable until the box is closed. I am just unsure how to go about this as it is coming from the printer driver(my guess).

    Any suggestions?

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Supress Driver Dialoge Promt?

    More information about the kind of printer and code may help us help you.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Re: Supress Driver Dialoge Promt?

    Quote Originally Posted by dbasnett View Post
    More information about the kind of printer and code may help us help you.
    I am running a test application and right now this is all the code there is :P

    vb.net Code:
    1. Imports System.Drawing.Printing
    2.  
    3.  
    4. Public Class Form1
    5.  
    6.     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    7.  
    8.         Dim x As New PrintDocument
    9.  
    10.         x.Print()
    11.  
    12.     End Sub
    13. End Class

    This is what the prompt looks like :

    Name:  DETE.JPG
Views: 103
Size:  27.0 KB

    The Printer is a wire label printer by Brady

    http://www.bradyid.com/bradyid/pdpv/WRAPTOR-PTR.html

  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Supress Driver Dialoge Promt?

    It might help if you actually put something in the document to print. The dialog may be the result of it finding nothing to print!
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Re: Supress Driver Dialoge Promt?

    Quote Originally Posted by dunfiddlin View Post
    It might help if you actually put something in the document to print. The dialog may be the result of it finding nothing to print!
    That is what I thought at first too but the dialogue box, shows up in all applications. The filename is the name that shows up on the printer

    Even if I use the Labeling software they provided, after hitting print I am prompted for a 'filename'. Same goes for word, paint etc.

  6. #6
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Supress Driver Dialoge Promt?

    Have you read this?

    http://msdn.microsoft.com/en-us/libr....printing.aspx

    In the very beginning it says, "Typically, when you print from a Windows Forms application, you create a new instance of the PrintDocument class, set properties, such as DefaultPageSettings and PrinterSettings, that describe how to print, and call the Print method to actually print the document. Calling the PrintDocument.Print method raises the PrintDocument.PrintPage event, which should be handled to perform the document layout for printing.

    Use the Graphics property of the PrintPageEventArgs object obtained from the PrintDocument.PrintPage event to specify the output to print. If you are printing a text file, use StreamReader to read one line at a time from the stream and call the DrawString method to draw the line in the graphics object. For more information about this process, see the Graphics and StreamReader classes. You can view an example of printing a text document in the PrintDocument class overview topic."
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  7. #7
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Supress Driver Dialoge Promt?

    Weird. In that case I guess it's firmware so I'm not sure that there's any way to do away with it altogether. It may be possible to fill it in automatically using SendKeys but that's gonna depend on how much information you can get on when it shows. Tricky.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Re: Supress Driver Dialoge Promt?

    Quote Originally Posted by dbasnett View Post
    Have you read this?

    http://msdn.microsoft.com/en-us/libr....printing.aspx

    In the very beginning it says, "Typically, when you print from a Windows Forms application, you create a new instance of the PrintDocument class, set properties, such as DefaultPageSettings and PrinterSettings, that describe how to print, and call the Print method to actually print the document. Calling the PrintDocument.Print method raises the PrintDocument.PrintPage event, which should be handled to perform the document layout for printing.

    Use the Graphics property of the PrintPageEventArgs object obtained from the PrintDocument.PrintPage event to specify the output to print. If you are printing a text file, use StreamReader to read one line at a time from the stream and call the DrawString method to draw the line in the graphics object. For more information about this process, see the Graphics and StreamReader classes. You can view an example of printing a text document in the PrintDocument class overview topic."
    Tried this and same thing.

    vb.net Code:
    1. Imports System.Drawing.Printing
    2.  
    3.  
    4. Public Class Form1
    5.  
    6.     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    7.  
    8.         Dim x As New Printing.PrintDocument
    9.  
    10.      
    11.         AddHandler x.PrintPage, AddressOf Me.Printh
    12.         x.PrinterSettings.PrintFileName = "WAE"
    13.         x.Print()
    14.  
    15.         RemoveHandler x.PrintPage, AddressOf Me.Printh
    16.  
    17.     End Sub
    18.  
    19.     Private Sub Printh(ByVal sender As Object, ByVal args As Printing.PrintPageEventArgs)
    20.         Static i As Integer = 0
    21.         i = i + 1
    22.  
    23.         args.Graphics.DrawString("TEST ", New Font(Me.Font, FontStyle.Regular), Brushes.Black, 10, 10)
    24.  
    25.    
    26.     End Sub
    27. End Class

    Quote Originally Posted by dunfiddlin View Post
    Weird. In that case I guess it's firmware so I'm not sure that there's any way to do away with it altogether. It may be possible to fill it in automatically using SendKeys but that's gonna depend on how much information you can get on when it shows. Tricky.
    That is my guess too and it is VERY inconvenient.

    Ideally, how I want it to work is :

    I have a datagridview with a fairly long list. Every time the user changes their selection in the list, a prompt is sent to the printer and the label is ready to print. So to have that pop-up come up and send an escape key every time is the last resort. Will keep messing around with the settings and see if I can take away focus from the pop-up or something

  9. #9
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Supress Driver Dialoge Promt?

    Does Brady have a support forum? Might get better answers there if they do.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Re: Supress Driver Dialoge Promt?

    Quote Originally Posted by dbasnett View Post
    Does Brady have a support forum? Might get better answers there if they do.
    They dont, but I have been e-mailing their tech support. As of now 'there is no way to bypass that screen'

    Hopefully we are able to work something out

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