Load Event

Occurs immediately after the Show or ShowDialog methods
Occurs just before the form is actually displayed.
If you hide and show the form again, this event is not fired
Never add or change the code in the Designer.vb file
This event can be automatically added by double clicking anywhere on the windows form while working in Design mode.


public partial class Form1 : System.Windows.Forms.Form 
{
  private void Form1_Load(object sender, EventArgs e)
  {
    this.Text = "Form Title";
  }
}



VB.Net

Private Sub Form1_Load(sender As Object, 
                       e As EventArgs) Handles MyBase.Load
  Me.Text = "Form Title"
End Sub

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext