No text output to form

Just started learning MSVB 6.0.  Trying Example 2.1.1 from this site -> http://www.vbtutor.net/lesson2.html
When run program the Form appears but there is no text.
yunikonAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
JackOfPHConnect With a Mentor Commented:
set the autoredraw of the form to true.

me.autoredraw = true
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Copy-paste the code you have behind the form into this question.
0
 
yunikonAuthor Commented:
Code:

Private Sub Form1_Load()
Form1.Show
Print "Hello World"
End Sub
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
nffvrxqgrcfqvvcCommented:
Private Sub Form1_Load()
Form1.Show
Print "Hello World"
me.refresh '// update
End Sub
0
 
yunikonAuthor Commented:
Added  'me.refresh '// update'.  Still doesn't work.
0
 
Alkali_GuyCommented:
Private Sub Form1_Load()
Form1.Show
Form1.Print "Hello World"
End Sub
0
 
Alkali_GuyCommented:
If the code doesn't work, one possibility is that stuff drawn in Form1_Load never appears.  If that's true, try moving your code to Form_Paint.
0
 
Alkali_GuyConnect With a Mentor Commented:
OK, I've got it.  Change Form1_Load to Form_Load.  Form1_Load is not a legitimate event name.

Alkali_Guy
0
 
yunikonAuthor Commented:
Private Sub Form1_Load()
Form1.Show
Form1.Print "Hello World"
End Sub

Private Sub Form1_Paint()
Form1.Show
Form1.Print "Hello World"
End Sub

don't work.  
Could there be some setting that I need to adjust?

0
 
nffvrxqgrcfqvvcCommented:
Alkali_Guy answered your question were we all missed that you have Form1_Load its not Form1_Load it should be Form_Load

points should go to Alkali_Guy

Private Sub Form_Load()
Form1.Show
Print "hello world!"
End Sub
0
 
yunikonAuthor Commented:
Alkali_Guy and JackOfPH gave the right answers.  I needed to use both:

Private Sub Form_Load()
Form1.Show

and:

me.autoredraw = true

Text is now outputing to the form, thanks a lot.
0
All Courses

From novice to tech pro — start learning today.