Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I made a form that should disable the form, open up a dialog form, then re-enable the original form, but it just disables the form and hangs the original form, no dialog form is show. Please help.

Code:
VB
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        Me.Enabled = False
        Dialog1.ShowDialog()
        Me.Enabled = True
    End Sub
Posted

1 solution

Show your dialog first and have it immediately disable the previous form. When it closes, have it re-enable the original form.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900