|
-
Nov 15th, 2001, 12:31 PM
#1
Thread Starter
Frenzied Member
Printing??
I wanna print a bunch of stuff.
Do you have any tutorials/code???
-
Nov 15th, 2001, 12:32 PM
#2
Orginally posted by Evan
I wanna print a bunch of stuff.
What kind of stuff? From what do you wish to print it?
-
Nov 15th, 2001, 12:41 PM
#3
Thread Starter
Frenzied Member
I wish to print a bunch of items from a text box in a semi arranged order. With a image of the companys logo at the top.
-
Nov 15th, 2001, 12:46 PM
#4
If you want them in a specific order, then place them in that order in the text box. Standard text boxes do not offer a lot of flexibilty. Also, standard text boxes don't support bitmaps and such, so you can forget about your company logo unless you have logo paper loaded in the printer.
Moving from a stanard text box to a Richtextbox would give you more flexibility, and Richtextboxes do allow you to insert pictures, icons, bitmaps, etc. although it, too, will print its contents in the order in which the items are stored.
-
Nov 15th, 2001, 12:56 PM
#5
Thread Starter
Frenzied Member
-
Nov 15th, 2001, 12:58 PM
#6
Ok. I don't use pictures in Richtextboxes all that much, so I don't have an immediate example. Let me whip something up for you.
-
Nov 15th, 2001, 01:34 PM
#7
Whew...this was more interesting than I thought it would be. Substitute the path and bitmap name in this piece of code for a bitmap that you have on your machine somewhere. The rest should work.
VB Code:
Private Sub Form_Load()
Dim lpobj As OLEObject
Dim szfilename As String
szfilename = "c:\sys\winemu\ibmloglo.bmp" ' put some valid file name here
Set lpobj = RichTextBox1.OLEObjects.Add(, , szfilename)
lpobj.DisplayType = rtfDisplayContent
' if you un comment the following line you will go to edit mode:
'lpobj.DoVerb
Set lpobj = Nothing
'add text
End Sub
Private Sub cmdPrint_Click()
Call RichTextBox1.SelPrint(Printer.hDC)
End Sub
You will probably want to play around with this quite a bit until it does whatever you need it to do, but I hope I have at least given you a starting point.
-
Nov 15th, 2001, 03:07 PM
#8
Thread Starter
Frenzied Member
woaha. Thanks. Ill try that tomarrow mornin =)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|