Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have made a exe file in c# where in i have a date in date time picker control and based on the range of selected date i make the dates in the month calendar in bold style.then i close my exe.next time i open my exe i want to see the dates bolded which were done before,instatnly upon opening.how to do it?
Posted

1 solution

Don't even think of changing your EXE file - that will get slapped by anti-virus products immediately!

Instead, look at using the Settings.Settings file to store your highlighted info between execution runs.
Open you project in VS, look at the Solution Explorer pane, open the Properties branch, and double click on Settings.Settings
In the page that results add a new setting.
You can then access the value in your code via
C#
... = Properties.Settings.Default.YourSettingName;
And save it by using:
C#
Properties.Settings.Default.YourSettingName = newValue;
Properties.Settings.Default.Save();
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Aug-15 15:40pm    
It has nothing to do with anti-virus protection. OS blocks all file changes for all files loaded for execution.
—SA

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