is it possible to call form load event on button click

Following is the vb code i want same function in vb.net

Private Sub cmdaddcancel_Click()
  
      Form_Load
  
      End Sub

Private Sub cmdaddcancel_Click() Form_Load End Sub

in vb we simply call Form_Load is it possible in vb.net

For eg: IN VB.net currnetly i am on form no 1 and there is one button on click of dat button i want the current form should again load is it possible

PLS HELP.........

Dani AI

Generated

Short answer: yes — the Load handler can be invoked from a button click, but the clean, maintainable approach is to move the initialization logic out of the Load event into a reusable method and call that from both the Load handler and the click handler. asked about the VB6 habit of calling Form_Load directly, and pointed out calling the handler is possible; the pattern below keeps intent clear and avoids lifecycle surprises.

Place shared setup code in a single routine and call it from both places:

Private Sub InitializeFormState()
    ' move form setup here: populate lists, bind data, reset controls, etc.
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    InitializeFormState()
End Sub

Private Sub cmdAddCancel_Click(sender As Object, e As EventArgs) Handles cmdAddCancel.Click
    InitializeFormState()
End Sub

Notes and cautions: calling the Load handler directly (as in older VB) can work but may bypass expected lifecycle behavior; OnLoad is a protected method and raising it manually can have side effects. For a true reset of the UI state, recreate the form instance instead of trying to replay lifecycle events. When only data needs refreshing, refresh the specific data sources or use BindingSource reset methods rather than re-running all startup code.

use following:

Call Form1_Load(Nothing, Nothing)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.