Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 28th, 2005, 01:59 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing problem in Visual Basic ! Urgent

hi to all,
I have the printing problem in VB.

this is the code I've used
Public Sub test()
  Printer.ScaleMode = vbtwips
  Printer.PaperSize = vbPRPSUser
  Printer.Height = 4*1440
  Printer.Width = 6*1440
  printer.print "Hi"
  .
  .
  .
  .
  Printer.NewPage
  Printer.EndDoc
End Sub
my paper size is 4'' and I need to stop formfeed of the
printer after printing is over i.e., afte 4'' height
but
It get stuck in the line Printer.PaperSize=vbPRPSUser
the error says that Run-Time Error: '380' Invalid Property Value



Reply With Quote
  #2 (permalink)  
Old January 28th, 2005, 11:59 AM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Help says
Quote:
quote:Setting a printer's Height or Width property automatically sets .PaperSize to vbPRPSUser
Perhaps you cannot set this particular value directly.

Try not setting it, set your paper size, then read the .PaperSize property to see if it is equal to vbPRPSUser.
Reply With Quote
  #3 (permalink)  
Old January 29th, 2005, 02:22 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for help, but
I have another problem

I've used this code now without vbPRPUser

Public Sub test()
  Printer.ScaleMode = vbtwips
  Printer.Height = 4*1440
  Printer.Width = 6*1440
  printer.print "Hi"
  .
  .
  .
  .
  Printer.NewPage
  Printer.EndDoc
End Sub

it formfeed the entire paper

my paper size is 4''
I need to stop formfeed after printing is over i.e., after 4'' height

Thanks in advance

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
printing in custom paper size in visual basic imagetvr Pro VB 6 2 May 3rd, 2008 09:58 PM
problem in API programming in visual basic 2005 jatin Visual Basic 2005 Basics 2 March 16th, 2007 03:11 PM
printing problem with crystal report visual basic gajendrabang Crystal Reports 2 January 3rd, 2007 02:09 AM
Visual basic.net problem Brettvan1 VB.NET 2002/2003 Basics 14 January 24th, 2005 01:40 PM
Visual Basic Encountered a Problem and Needs to .. Niaz Pro VB 6 4 September 1st, 2004 03:34 PM



All times are GMT -4. The time now is 04:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.