On a form completely blank and one check box, what code do I need there so if ticked and reloaded the main form loads and this blank form doesnt?
Thank you.
Printable View
On a form completely blank and one check box, what code do I need there so if ticked and reloaded the main form loads and this blank form doesnt?
Thank you.
Which of these two scenarios are you talking about:
1) Run the app.
2) Show the form.
3) Check the checkbox.
4) Hide the form.
5) Attempt to show the form again, but it doesn't show.
6) Close the app.
or else:
1) Start the app.
2) Show the form.
3) Check the checkbox.
4) Close the app.
5) Start the app again.
6) Attempt to show the form again, but it doesn't show.
7) Close the app.
This sounds like a "don't show this message again" scenario. If so, create a setting of type Boolean on the Settings page of the project properties. You can choose to set the default value to True or False, depending on whether you want it to mean show or don't show the form. The choice is yours. When you run the app, test the value of that setting and either show or don't show the form as appropriate. When the user checks the CheckBox to not show the form, simply toggle the value of that setting via My.Settings. Once the settings are saved, which you can do explicitly or allow to happen automatically at shutdown, the form will not be shown again.
1. Start the app
2. Form Displays a comment
3. Tick Box to Dont Show again
4. Main app loads
5. Main app closes
6. Main app opens and that previous Form I ticked to not show, doesnt show
7. Happy
Here is an example project done in VS2008
Spot on kevininstructor. Thank you. +rep