PDA

Click to See Complete Forum and Search --> : Printing


YoungBuck
May 18th, 2000, 11:59 PM
How would I go about printing an array of values using the API (or any other useful way)?

CreepingDeath
May 19th, 2000, 12:15 AM
Print to the screen or print to a printer? Oh well, to get the values from myArray in sequential order, separated by commas in myString, just do a For-Next loop.


Dim i As Integer
Dim sizeOfArray As Integer
Dim myString As String

For i = 0 To sizeOfArray
myString = myString & myArray(i) & ","
Next i


In VB6 I believe there is a code to get the size of an array. I think


UBound(arrayName As Array)


returns the upper bound of an array. I hope this helps.

-CD

YoungBuck
May 19th, 2000, 09:06 AM
Thanks but I meant how do you actually print the values to the printer, i.e. what are some API calls and how are they used. Thanks anyway though ;).

Janitor
May 21st, 2000, 11:39 PM
Actually, you will not to use API's to accomplish printing. Check out the printer object included in VB's environment (either through the help documentation or using the object browser) and see if this helps you. If you still have individual questions post them back here and we'll see what we can do.

Jay D Zimmerman