Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created setup project to install windows service.In that i have added extra dialog box to already existing dialog box which should prompt user 2 parameter .how to disable next button if user does not enter any data into the text boxes during the installation time.
Posted

1 solution

If you are able to create a new window to get detailed information from the user, then you must be able to get the detailed interactions of his. For example, if you created a new dialog box and which in turn returns the value (which you would use further). You can check that value to be null or useful.

C#
if(valueReturned != null && valueReturned == useful) {
   // Where valueReturned is the value user would provide
   // useful is what to check against, because you have to make sure
   // value is correct also; such as Product key etc.
}


But, apart from this I would recommend that you try to not close that dialog until user has provided you with a valid data. If user has not provided data, terminate the process at that time. This way, instead of checking the returned value and disabling the button you will be able to prompt the user for value at that stage itself. :)
 
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