Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
C#
Properties.Settings.Default.ShowSplashScreen = checkBox1.Checked;

i made this as
C#
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
( or is there another option like enabling and disabling the toolstrip menu item for enabing the splash form)
Posted

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.
 
Share this answer
 
Comments
shaikh-adil 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
fjdiewornncalwe 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.
i have bound that to the propoerty named
application setting and its done
 
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