473,379 Members | 1,520 Online

# time event at a specific time

Hi!

Is it possible to get a time event at a specific time, for
instance eight a'clock? My program is running in the
background and is minimized to the tray bar.

If not, is there a smooth way to accomplish this in a
different way?

Best regards,
Andreas Lundgren
Nov 20 '05 #1
9 2494
"Andreas Lundgren" <d9****@efd.lth.se> schrieb
Is it possible to get a time event at a specific time, for
instance eight a'clock? My program is running in the
background and is minimized to the tray bar.

If not, is there a smooth way to accomplish this in a
different way?

Add a Timer and check the date/time each time the Tick or Elapsed event
occurs.
--
Armin

Nov 20 '05 #2
Hi Andreas,

Calculate how long it is before your event and then set the interval on a
new Timer. Start the Timer then sit back and wait.

Regards,
Fergus
Nov 20 '05 #3
Hi Fergus,
This you don't end with Regards,
But with
Happy newyear,
Cheers,
Cor
Nov 20 '05 #4
Hi Cor,

Happy New Year?

I'm not sure why, but hey - Happy New Year, anyway!! ;-)

Cheers,
Fergus
Nov 20 '05 #5
>>>Calculate how long it is before your event and then set the interval on a
new Timer. Start the Timer then sit back and wait.

Happy New Year?

I'm not sure why, but hey - Happy New Year, anyway!! ;-)

Cheers,
Fergus

I saw him sitting after his computer with a beer in his hand or something,

:-))
Cor
Nov 20 '05 #6
Problem is that the longest intervall is aprox. 64
seconds. So it's not going to be a very long wait...

-----Original Message-----
Hi Andreas,

Calculate how long it is before your event and then set the interval on anew Timer. Start the Timer then sit back and wait.

Regards,
Fergus
.

Nov 20 '05 #7
"Andreas Lundgren" <d9****@efd.lth.se> schrieb
Problem is that the longest intervall is aprox. 64
seconds. So it's not going to be a very long wait...

Did you see my suggestion?
--
Armin

Nov 20 '05 #8
Hi Andreas,

64 seconds is ages to a Timer. ;-)

Is there any reason why a Timer wouldn't work, for instance, do you need
more precision than it can provide?

Regards,
Fergus
Nov 20 '05 #9
Hi Andreas,
\\\\
To give you a third alternative
Dim mywatch As Date = Date.Parse("20:00:00")
Do While mywatch > Date.Now
Application.DoEvents()
Loop
////
Cor
Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

### Similar topics

 10 by: Andreas | last post by: Hi! Is it possible to get a time event at a specific time, for instance eight a'clock? My program is running in the background and is minimized to the tray bar. If not, is there a smooth way... 1 by: Treetop | last post by: I used the following script for a site to stop displaying after a date / time, but it seems huge. Any ideas on how to make it shorter? There are many events in this list. function events() {... 77 by: Charles Law | last post by: Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the... 43 by: Mike MacSween | last post by: Or something to do with Nulls in PK. Which is obviously wrong. OK, after a diversion of having to earn money its back to the free one. The orchestral management system. At the E-R level: An... 9 by: HL | last post by: I am using VS 2005 Beta - C# Problem: The Timer fires a few milliseconds before the actual Due-Time Let's say a timer is created in the following manner: System.Threading.Timer m_timer = null;... 3 by: Brad | last post by: The first text on my form is a numeric field. I have a javascript that runs on this field for onkeyup (validate the key strokes and modifies fields on the screen) but when I do this and have the... 22 by: Drum2001 | last post by: I have a table that tracks employee times. I have a column (Date/Time). Users, through a form, enter how long it takes them to complete a task. For example, 03:45 = 3 hours and 45 mins. I am... 3 by: Aussie Rules | last post by: Hi, I want to be able to to have an event fired within my application at a certain time on certain days (such as 2am Monday, Wednesday and Friday) as well as other timers that fire an event... 1 by: CloudSolutions | last post by: Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now... 0 by: Faith0G | last post by: I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be... 0 by: isladogs | last post by: The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former... 0 by: taylorcarr | last post by: A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,... 0 by: aa123db | last post by: Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function \$name\$ (\$parameters\$) { } ... 0 by: ryjfgjl | last post by: If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming... 0 by: ryjfgjl | last post by: In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files... 1 by: Sonnysonu | last post by: This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to... 0 by: Hystou | last post by: There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...