General discussion

Locked

Generic Text printer with VB6

By ssk.tech ·
Dear Members,

I am using Windows 2000 Generic Text Printer in my VB6 application to print an invoice. The invoice size is of 120mm x 150mm. The text printer uses standard paper sizes. I want to add custom paper size to Generic Text Printer. In Windows98 I can add custom paper size to the text printer but how to do this for Windows2000. Please help me in this regard. Your earliest help in this regard will be highly appreciated.

Thanking you.
With Best Regards,
Suhaas

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by naseemi In reply to Generic Text printer with ...

Howzit,
Not sure if this will work for you. Try setting the default setting for the printer your are using to that paper size. This way no matter the setting on windows it will always use the default paper size selected at the printer setting.It works for me.

Collapse -

by ssk.tech In reply to Generic Text printer with ...

Dear Howzit/Members,

Thank you for the reply.

Where to set this paper size for Generic Text printer? Bcoz text printer does not allow to add custom paper size. Please clarify this also.

Thanking you in advance.

Collapse -

by Miss Kitty In reply to Generic Text printer with ...

Go to Control Panel.
Double click Printers.
click on File
click on Server Properties.
(This is where you can add a new form)
Add a new form with the custom size that you need, then go into printing preferences on the generic printer and select the new form. You can also use a print dialog on your VB6 form and go into your printing preferences from the VB application. By coding it this way, you aren't setting the default on your printer to always use this form until you change the default.

I hope I explained this clear enough.
Cathy
covcat@riverstonegrp.com

Collapse -

by Miss Kitty In reply to

I went in and added a test form, but I converted from the 120mm X 150mm to 4.72in X 5.91in. After I converted to inches, the form was available. I wouldn't try to code my form size in VB; I would add a Common Dialog box and set it to be a printer type and then when I went to print, I would go into the print properties and select my form. By doing this the user can set the form to print the invoices, but not change the actual printer default form. It won't screw the user up on the next thing he sends to the printer.

Cathy

Collapse -

by ssk.tech In reply to Generic Text printer with ...

Hi Kitty/Cathy,

Thank you for the reply.
I added a "custom" paper size of (10cm X 20cm) as per your instructions. Also I have assigned this paper size to the Generic Text printer as default. I set the printer.papersize to vbprpsuser in my VB6 code but VB gives error to this line as "Invalid Property Value". My system OS is Windows2000. How to assign user defined paper size in VB6? Please help for this.

Thanking you in advance

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums