Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / March 2008

Tip: Looking for answers? Try searching our database.

Changing my clock makes my app not compile?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott McNair - 07 Mar 2008 17:50 GMT
I'm writing a routine that does some cleanup whenever it senses a change in
the date.  The only way to test my code is to set the date back to
yesterday at 11:59pm and observe the change as it occurs.

I did so, and noticed an error.  So I altered my code to allow for the
error and rolled the clock back a minute or two, so that it was back to
11:59 yesterday.  The same behavior occured.

So I put a MsgBox in the routine to alert me to what the value was for a
couple of variables, and I re-ran the app.  The MsgBox never ran.

I moved the MsgBox to the very beginning of the routine.  Still it wouldn't
fire.

I moved the MsgBox to the first line of the button event that fires the
routine.  Still the MsgBox wouldn't fire.

I removed the MsgBox line, and added Exit Sub to the very beginning of the
button event.  The button still called the routine.

I removed the Exit Sub line, and added MsgBox("loaded") to Form_Load.  The
MsgBox never fired.

I reset the time to the current time and compiled, and everything worked
fine.

It seems as though .NET has some safeguard to keep you from compiling over
a newer version with an older version.  Am I correct in this assumption?
Tony K - 07 Mar 2008 22:24 GMT
Maybe try doing a Clean then Rebuild??

Tony K.

> I'm writing a routine that does some cleanup whenever it senses a change
> in
[quoted text clipped - 26 lines]
> It seems as though .NET has some safeguard to keep you from compiling over
> a newer version with an older version.  Am I correct in this assumption?
Just_a_fan@home.net - 15 Mar 2008 00:36 GMT
Changing the clock time is dangerous and I would never recommend it.

Try just putting a checkbox on your form and whenever you click it,
trigger the cleanup.

Waiting for midnight is a pain.  You only get one test per day.  Canging
the clock is dangerous, too.

Try triggering the cleanup some other way if at all possible.

Mike

On Fri, 07 Mar 2008 09:50:32 -0800, in
microsoft.public.dotnet.languages.vb Scott McNair
<smcnair@beachexpress.takethispartout.com> wrote:

>I'm writing a routine that does some cleanup whenever it senses a change in
>the date.  The only way to test my code is to set the date back to
[quoted text clipped - 24 lines]
>It seems as though .NET has some safeguard to keep you from compiling over
>a newer version with an older version.  Am I correct in this assumption?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.