Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 2nd, 2005, 02:34 AM
Authorized User
 
Join Date: Sep 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to vb_programmer Send a message via Yahoo to vb_programmer
Default Printer Object : How to set Page Margins?

Hello to All Forum Members,

I'm currently working on a project in which I need to implement the Print Functionality for a Text Box. As Textbox does not support any Print method (as its there in RTB), I need to use VB's built-in Printer Object.

The problem is that, now I'm able to print the Text to Printer Object but I'm not able to set the Margine for the Page. I have implemented the PageSetup Dialogbox and collect all the necessary Information from that Dialogbox. But I'm not aware of the exact property of Printer object to which I need to assign these values.

Can anybody please tell me how to do this? If any code can shown or a link given then it will help me better ... Hints and Tricks are also welcome.

Please help me in this ... Waiting for your valuable reply.

Ruturaaj.
 
Old September 2nd, 2005, 01:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are using the Print object, you can set the start position wherever you want using CurrentX and CurrentY. Or am I missing something?

printer.currentX = myMargin
printer.currentY = myTposition
printer.Print "one line of text"

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Paper Size (custom also) to default Printer gaurikhot .NET Framework 2.0 2 December 6th, 2008 01:50 AM
Printer Object rudycoop Beginning VB 6 1 December 28th, 2007 12:01 PM
Set Printer Font savandavande VB.NET 2002/2003 Basics 0 October 7th, 2006 05:31 AM
page margins not set in the exported pdf files boat Crystal Reports 0 April 21st, 2004 04:36 AM
printer object fonts module0000 Beginning VB 6 1 June 22nd, 2003 07:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.