Results 1 to 6 of 6

Thread: Checkbox to show form no more

  1. #1

    Thread Starter
    Hyperactive Member jokerfool's Avatar
    Join Date
    Dec 2006
    Location
    Gold Coast, Australia
    Posts
    452

    Resolved Checkbox to show form no more

    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.
    Last edited by jokerfool; Apr 11th, 2013 at 11:03 AM.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Checkbox to show form no more

    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.
    My usual boring signature: Nothing

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Checkbox to show form no more

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Hyperactive Member jokerfool's Avatar
    Join Date
    Dec 2006
    Location
    Gold Coast, Australia
    Posts
    452

    Re: Checkbox to show form no more

    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

  5. #5
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Checkbox to show form no more

    Here is an example project done in VS2008

  6. #6

    Thread Starter
    Hyperactive Member jokerfool's Avatar
    Join Date
    Dec 2006
    Location
    Gold Coast, Australia
    Posts
    452

    Re: Checkbox to show form no more

    Spot on kevininstructor. Thank you. +rep

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width