Click here to Skip to main content
11,721,385 members (80,708 online)
Rate this: bad
good
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
( or is there another option like enabling and disabling the toolstrip menu item for enabing the splash form)
Posted 27-Nov-12 9:21am
Rate this: bad
good
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.
  Permalink  
Comments
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
good
Please Sign up or sign in to vote.

Solution 2

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

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 440
1 OriginalGriff 229
2 Mika Wendelius 170
3 F-ES Sitecore 80
4 cyycoish 70
0 Sergey Alexandrovich Kryukov 2,209
1 OriginalGriff 969
2 F-ES Sitecore 660
3 Maciej Los 609
4 Richard MacCutchan 560


Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2015
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