• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

printing contents in textbox

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
RanjiniPraba
Asked:
RanjiniPraba
1 Solution
 
TomLaw1999Commented:
Try something like this
if printer.currentX < 1000 then printer.currentx = 1000

0
 
lschueleCommented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now