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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing on form

Status
Not open for further replies.

savok

Technical User
Joined
Jan 11, 2001
Messages
303
Location
AT
I want to print "HELLO" on the form, then clear it and print "GOODBYE" lets say

using 2 buttons

so in cmdHello id put something like

print("HELLO")

and in cmdBye id put Goodbye

now the question is how do i clear the text on the form?

also how do i set the text to print in the middle?
cause if you dont specify a location it prints it in the top left corner.

Is there a way to Print("hello" x, y)
with x y being the coordinates?

thanks
 
You can insert a label on a blank form and modify it to suite your needs.
Code:
Label1.Caption = ""     'Blank

Label1.Caption = "Hello!"

etc.
 
yes yes I know but what I am trying to do is

Print on the form the following Array

dim test(2,2)
test(0, 0) = "X"
test(0, 1) = "X"
test(1, 0) = "X"
test(1, 1) = "X"
Dim sVal As String
For i = 0 To 1
For j = 0 To 1
sVal = sVal & maze(i, j)
Next j
sVal = sVal & vbCrLf
Next i
Print (sVal)

the above code would print
XX
XX

in the TOP LEFT corner of the form.

Now lets say I change the Array to the letter A

and I want to print over the XXXX how would I print in the same spot?

thanks
 
Try "Cls"

Also, you might want to set the form.autoredraw property to true - either in Code or (for this SIMPLISTIC exercise) just in the form proerty sheet.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top