Thursday, October 28, 2010

How to Disable a button forever in vb?

Hey guys..Iam making a vb 2008 application and i want the button to be disabled forever or till application reinstall to be disabled..Its like i click on it once and it is disabled forever...Hope you can help.....How to Disable a button forever in vb?
Just hide the button. Input the code in the buttons click event.

btnSave.Visible = FalseHow to Disable a button forever in vb?
That is a tall order. What I would do is save the button state into the current user software section, under your application name. When the application loads up it can read the registry and set the button enabled state based on the registry value.



Your installation should setup the registry value and delete it when the application is uninstalled.

No comments:

Post a Comment