Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing within a box

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
i am using printer.print commmand for report writting
i want to print a matter within a box

how can i print pl help.

shanmugham@hotmail.com
 
Your post is a bit confusing. What do want to print? Something into a textbox? ie...

text1.text="this is something"

something from a textbox? ie..

printer.print text1.text
printer.enddoc


If I am way off, please forgive.

tsmith
 
The code below will draw a box around text printed. Note that at the end of each printer.print line that has text there is a ";" this is to hold the printer position to get the printer.CurrentX position.

The If Printer.CurrentX > EndX is used to insure that the longest line of text is inclosed in the box



Dim StartX As Single
Dim EndX As Single
Dim StartY As Single
Dim EndY As Single

Private Sub Command1_Click()
Printer.FontSize = 20
StartX = Printer.CurrentX
StartY = Printer.CurrentY

Printer.Print "Hello World";
EndX = Printer.CurrentX
Printer.Print

Printer.Print "This Will Draw A Box";
if Printer.CurrentX > EndX then EndX = Printer.CurrentX
Printer.Print

Printer.Print "Around the Text Printed";
if Printer.CurrentX > EndX then EndX = Printer.CurrentX
Printer.Print

EndY = Printer.CurrentY
Printer.Line (StartX, StartY)-(EndX, EndY), , B
Printer.EndDoc
End Sub
 
thanks papayac

i need this type,
excel type of printing
all printing with in a 10 X 3 table format
through printer.print method

pl help me
-----------------------------------------------------------
Paper –I Awarded Maximum
Computer Oriented Numerical Methods
Theory 90 100
Practical 98 100
Total 188 200
-----------------------------------------------------------
Paper-II
Visual Basic
Theory 95 100
Practical 99 100
Total 194 200
-----------------------------------------------------------

thanks in advance

shanmugham (shanmugham@hotmail.com)
 
thanks papayac

i need this type,
excel type of printing
all printing with in a 10 X 3 table format
through printer.print method

pl help me
-----------------------------------------------------------
Paper –I Awarded Maximum
Computer Oriented Numerical Methods
Theory 90 100
Practical 98 100
Total 188 200
-----------------------------------------------------------
Paper-II
Visual Basic
Theory 95 100
Practical 99 100
Total 194 200
-----------------------------------------------------------

thanks in advance

shanmugham (shanmugham@hotmail.com)
 
I don't know much about pulling data in from Excel. Or do you mean that you want the information tableted as it is in Excel. The 10 x 3 box is that 3 inches wide by 10 inches high? Is there additional data ex. a seperate sheet per student or person? Will all the data fit inside a 10 x 3 box or does the program have to know to continue on another page?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top