Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
i have a splash form which works when there is checkbox checked in the main software,
but i want to make the toolstrip menu item of menu works as checkbox,
i have this code
Properties.Settings.Default.ShowSplashScreen = checkBox1.Checked;
i made this as
 Properties.Settings.Default.ShowSplashScreen = sETTINGToolStripMenuItem.Checked; 
but the problem is. the menu item i.e toolstrip menu it is not saving my checkstate. for example when using checkbox, it saved my checkstate. and in menu i want to save the checkstate for showing that splash screen is working or not.
( or is there another option like enabling and disabling the toolstrip menu item for enabing the splash form)
Posted 27-Nov-12 10:21am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You need to save the checkbox state from your application into a configuration file/registry/table and then simply read that value from that datasource when you start up your application. Based on that saved value, you show/hide your splash screen.
NOTE: You DO NOT read the value from a form control to do this, you read the saved configuration value.
shaikh-adil at 27-Nov-12 20:29pm
tell me about. Menu checked option. How to do that???
If i click on that tool strip menu then the checked mark is shown. I want to regain the state of the tool strip menu item. When application is started the check mark will b filled automatically
Marcus Kramer at 27-Nov-12 21:31pm
If you want to remember the state of that item, then you need to save it somewhere like my solution says and then read it back in when you start up your application again.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

i have bound that to the propoerty named
application setting and its done

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 280
1 BillWoodruff 170
2 Zoltán Zörgő 170
3 OriginalGriff 134
4 Sergey Alexandrovich Kryukov 120
0 OriginalGriff 7,760
1 DamithSL 5,874
2 Sergey Alexandrovich Kryukov 5,444
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539

Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100