|
Printing and spaces
|
Email
|
|
|
|
|
The purpose of this article is to introduce the new user to the art of printing quickly and simply.
|
|
Many people believe VB to be a major pain as like other programming languages because they are too tech. So are most things if you think about it for long enough and you're new to it. Anyway, here is a simple way to print in visual basic and also introduce you to a neat printing method. I take no credit for this because it is an article I found elsewhere.
Create a new standard.exe
create two labels
do what you want with the labels. The name and the captions don't matter.
Now, create a button and change its caption to: &Print and its name to cmdPrint.
In the button's code window, type the following code:
Printer.Print label1.caption; spc(30); label2.caption
The above code must all be on 1 line.
Good. You've mastered a simple printing method.
You can, of course, manipulate the printing methods above to print documents in a snazzy manner.
Before End Sub, type the following code:
Printer.Enddoc
This ensures the print job ends as you finish printing. Nice one!
|
|
|
Other 9 submission(s) by this author
|
|
Report Bad Submission
|
Your Vote
|
|
Other User Comments
|
|
There are no comments on this submission. |
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)
To post feedback, first please login.
|