Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

What I am trying to do is when I click a button, it pops up another form to add info, and at the same time i disable the main form. Now when I exit the info form i want to re-enable the form. I don't want to us the dim frmnew as new frmmain and the .show because that just pops up a new form. I want to keep the existing form in tact

 

Main form code:

Private Sub cmdAddname_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAddname.Click

 

Dim frmName As New frmNames

frmName.Show()

Me.Enabled = False

 

End Sub

 

 

frmName code on exit:

 

Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click

 

frmMain.Enabled = True

Me.Close()

 

End Sub

Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...