Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want
printer = Quality1\BARCODE_PRAKASH
paper size = 24.9mm x 80.0mm
paper margin = (0,0,0,0)

What I have tried:

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

PrintDocument1.PrinterSettings.PrinterName = "\\Quality1\BARCODE_PRAKASH"
PrintDocument1.DefaultPageSettings.PaperSize = New System.Drawing.Printing.PaperSize("New page Format", 3.15, 0.98)
PrintDocument1.DefaultPageSettings.Margins = New Margins(0, 0, 0, 0)
PrintDocument1.PrinterSettings.Copies = TextBox4.Text

PrintDocument1.Print()


'this code not working plz help
Posted
Comments
OriginalGriff 9-Aug-22 2:09am    
And?
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

"It's not working" is one of the most useless problem descriptions we get: it tells us absolutely nothing about the problem. We don't know if you get an error message, or the wrong data, or even that that code compiles successfully!
So tell us what happens when you run that code, what you expected to happen, how you checked what happened. Help us to help you!

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.

Use the "Improve question" widget to edit your question and provide better information.
CHill60 9-Aug-22 5:11am    
You have tagged this as VB6 but state you are using VS 2019 - it can't be both so which is it?
OriginalGriff 9-Aug-22 6:34am    
Just a guess, but maybe he's found some recent VB code and is failing to get it working in VB 6 ...
CHill60 9-Aug-22 8:04am    
:laugh:
CHill60 2-Sep-22 8:00am    
If you still have issues with this and want some assistance you will need to provide the information we have asked for!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900