Advertisement

06.02.2008 at 08:20AM PDT, ID: 23450123
[x]
Attachment Details

How to write to My.Settings

Asked by JMO9966 in Visual Studio .NET 2005

Tags: Visual Studio 2005

I've Added a Setting named Trial_Start_Date and set it as Date type.

My plan is to leave the value Null in my project and then when I send my program to a prospect, my form load code would check this value and if Null (running for the first time), it would write that current date value to this file and then not run for more than 10 days.

I get an error in my code when I try to set Trial_Start_Date to Today().  It tells me it's Read-Only, but I don't see anywhere to set this be be writeable ??

VB.Net Project Properties
Settings Tab:
Trial_Start_Date      Date       

Dim Trial_Expired As Boolean = False

If IsDBNull(My.Settings.Trial_Start_date) = True Then
      My.Settings.Trial_Start_Date = Today()
End If

        If My.Settings.Trial_Start_Date.AddDays(10) < Now Then
            Trial_Expired = True
        Else
            Trial_Expired = False
        End If

        If Trial_Expired = True Then
            MessageBox.Show("This trial version has reached the end of the 10 day trial.")
            Application.Exit()
        End If

Thanks,
JMO9966
Start Free Trial
[+][-]06.02.2008 at 08:45AM PDT, ID: 21693009

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 10:25AM PDT, ID: 21702545

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 10:28AM PDT, ID: 21702568

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 10:28AM PDT, ID: 21702572

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 11:58AM PDT, ID: 21703374

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:03PM PDT, ID: 21703432

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:26PM PDT, ID: 21703678

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:38PM PDT, ID: 21703780

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 02:01PM PDT, ID: 21704507

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 04:51PM PDT, ID: 21705572

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Studio .NET 2005
Tags: Visual Studio 2005
Sign Up Now!
Solution Provided By: emoreau
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628