Henry Gathigira Henry Gathigira - 5 months ago 29x
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


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"....