change caption

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

Guest

hi,

in VB6 i can change the caption of the form by using

frmMain.Caption = "ABC"

how do i change it in .NET??
the text i want to change is found at the form1's properties > Appearance>
text

Thanks
 
It is:

Me.Text = "ABC" for example, but if you are need to change the caption for a
different form other than the current one then you refer to it like this:

Dim frm As New Form2
frm.Text = "ABC"
frm.ShowDialog()
frm.Dispose()

The above few lines declares a new instance of form2, sets its text (Caption
in VB6) to ABC, shows the form modally & destroys the object on close

I hope thi has helped
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top