Solved

printing contents in textbox

Posted on 2002-04-10
2
211 Views
Last Modified: 2010-05-02
i have to print the contents of the textbox, which i am able to do it with the help of print dialog box.
but the problem is there is no margin in printing. so, hoe do i set the margin in the paper so the contents are little indented and printed.
0
Comment
Question by:RanjiniPraba
2 Comments
 
LVL 4

Expert Comment

by:TomLaw1999
ID: 6932098
Try something like this
if printer.currentX < 1000 then printer.currentx = 1000

0
 

Accepted Solution

by:
lschuele earned 15 total points
ID: 6932134
If you are using the Printer object:

Use the Printer's scale properties to set margins. Set the properties so the position (0, 0) is mapped to where you want the margins. For example, the following code makes the left margin 0.5 inches and the top margin 0.75 inches. The factor of 1440 converts inches into twips.

Printer.ScaleLeft = -0.5 * 1440
Printer.ScaleTop = -0.75 * 1440
Printer.CurrentX = 0
Printer.CurrentY = 0

Printer.Print Me.Text1.Text
Printer.EndDoc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question