changing text in the form title bar....compile and runtime error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The last line in my Main() section is:

form1.ShowDialog()

The form appears, using the tile bar set in the properties window of the
form designer.

In the middle of form1, in one of my subs, I wish to change the tile bar or
the form.

I was using this line without problems:

'Form.ActiveForm.Text() = "======== New Text here ========"

I must have changed something elsewhere because not I get a compile error at
the above line.

Does the form have to be activated/inactived made visible?

Where should I look in troubleshooting this?

thanx......Joisey
 
What is the error? Where is 'Form' defined? If this is in the middle
of your form1, why can't you use Me.Text?
 
The last line in my Main() section is:

form1.ShowDialog()

Use 'Application.Run(New Form1())' instead.
The form appears, using the tile bar set in the properties window of the
form designer.

In the middle of form1, in one of my subs, I wish to change the tile bar
or the form.

I was using this line without problems:

'Form.ActiveForm.Text() = "======== New Text here ========"

Use 'Me.Text' instead. 'Me' will return a reference to the instance of the
form that contains the code that is executing. Notice that you don't need
'()' here -- 'Text' is a property.
 
Back
Top