Henry Gathigira Henry Gathigira - 2 years ago 142
Vb.net Question

How to Prevent double click on Save button

How do i prevent a user from clicking a save button twice and probably display something like "Please Wait" or Saving... in a vb.net windows forms application. I am trying

Buttonsave.Focus = False
labelSaving.Visible = True

Answer Source

There are many possibilities ...

This is a easy one

   yourButton.enabled= false
   ' save
Catch(Ex as exception )
   'do something
  yourButton.enabled= true
End Try

Now, you can imporve this by performing "Save" into a task, checking the state, showing a "saving message"....

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download