By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,058 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,058 IT Pros & Developers. It's quick & easy.

How to Print

getgagan
P: 10
How to print text contained in controls using vb6.0
Dec 12 '07 #1
Share this Question
Share on Google+
12 Replies


debasisdas
Expert 5K+
P: 8,127
which control you are asking about.
Dec 12 '07 #2

getgagan
P: 10
I want to print only text contained in Form in vb6.0
where text can be :

text = Text1.Text
or
text=label1.caption
or
text="any message"

I don't want to use any report for this....Wanna direct print from FORM
Dec 12 '07 #3

debasisdas
Expert 5K+
P: 8,127
do you want to print the form itself ?
Dec 12 '07 #4

9815402440
100+
P: 180
hi

if you want to print form itself then use printform method
else you can use following code

Printer.CurrentX = 10
Printer.CurrentY = 10
Printer.Print "message"


regards
manpreet singh dhillon hoshiarpur
Dec 12 '07 #5

getgagan
P: 10
Nope,
u mean: me.printform

I don't want to print Form
I want to print only text from Form

How to print text(string) from VB6.0 ?
Dec 12 '07 #6

QVeen72
Expert 100+
P: 1,445
Hi,

use:

Expand|Select|Wrap|Line Numbers
  1. Printer.Print Text1.Text
  2. Printer.Print Text2.Text
  3. Printer.Print Label1.Caption
  4. Printer.EndDOC
  5. 'Completion of Printing..
  6.  
REgards
Veena
Dec 12 '07 #7

getgagan
P: 10
printer.print is not supported at my end

How i initialize my printer on network for printing text from VBForm
Dec 12 '07 #8

getgagan
P: 10
thanks 4 ur kind support:
but printer.print is not supported in vb6.0 at my end
only printer.printquality is coming..
Help !
Dec 12 '07 #9

QVeen72
Expert 100+
P: 1,445
Hi,

You wont get Intellisense for Printer.Print, but type it,you will not get any type of error, and our code will run..

Regards
Veena
Dec 12 '07 #10

getgagan
P: 10
ya, it seems to be working

but the printer status is showing ------spooling for long time

If i try to print from other application as winword
printing is going fine

put some comments !
Dec 12 '07 #11

QVeen72
Expert 100+
P: 1,445
Hi,

did you write Printer.EndDOC
only this will trigger start of Printing

Or you can also try:

Expand|Select|Wrap|Line Numbers
  1. Printer.Print Text1.Text
  2. Printer1.NewPage
  3. Printer.EndDOC
  4.  
Regards
Veena
Dec 12 '07 #12

getgagan
P: 10
Now it works...

Thanks Veena
Dec 12 '07 #13

Post your reply

Sign in to post your reply or Sign up for a free account.