Click here to Skip to main content
15,923,557 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionDataGridView selection on right click Pin
~~~Johnny~~~25-Jul-06 6:55
~~~Johnny~~~25-Jul-06 6:55 
AnswerRe: DataGridView selection on right click Pin
Andrew Lygin25-Jul-06 8:47
Andrew Lygin25-Jul-06 8:47 
GeneralRe: DataGridView selection on right click Pin
~~~Johnny~~~25-Jul-06 8:58
~~~Johnny~~~25-Jul-06 8:58 
QuestionActivating Client side Web Service from Browser - HELP Pin
Andrew Mercer25-Jul-06 6:05
Andrew Mercer25-Jul-06 6:05 
QuestionWeb Access Failed Pin
asprajesh25-Jul-06 3:48
asprajesh25-Jul-06 3:48 
AnswerRe: Web Access Failed Pin
Jonathan [Darka]25-Jul-06 23:17
professionalJonathan [Darka]25-Jul-06 23:17 
QuestionCertificate in .Net Pin
kenq25-Jul-06 1:44
kenq25-Jul-06 1:44 
QuestionTimespan for Timer-interval Pin
invictus325-Jul-06 1:07
invictus325-Jul-06 1:07 
Hi
Is there any way I could use a TimeSpan as a interval for a Timer? milliseconds doesnt quite cover it when dealing with large intervals.

What I am making is a way for the application to get an event every day at the stroke of midnight. The code I use now is here:

This is for starting the timer with a interval that make is trigger on the exact hour of midnight.

DateTime now = DateTime.Now.AddDays(1);<br />
DateTime time2 = new DateTime(now.Year, now.Month, now.Day, 0, 0, 0);<br />
TimeSpan dif = time2 - DateTime.Now;<br />
<br />
timer1.Interval = (int)dif.TotalMilliseconds;<br />
timer1.Enabled = true;


If anyone know a more elegant way of doing this then PLEASE let me know. At least I want to get rid of the millisecond interval as a whole day is something more suited for TimeSpan object.
AnswerRe: Timespan for Timer-interval Pin
Guffa25-Jul-06 8:31
Guffa25-Jul-06 8:31 
GeneralRe: Timespan for Timer-interval [modified] Pin
invictus325-Jul-06 9:12
invictus325-Jul-06 9:12 
AnswerRe: Timespan for Timer-interval Pin
Guffa25-Jul-06 21:13
Guffa25-Jul-06 21:13 
Questioninterop & performance Pin
Super Lloyd24-Jul-06 23:48
Super Lloyd24-Jul-06 23:48 
AnswerRe: interop & performance Pin
Super Lloyd25-Jul-06 2:43
Super Lloyd25-Jul-06 2:43 
QuestionUsing of ComboBox Pin
Nagaraju_Focus24-Jul-06 19:07
Nagaraju_Focus24-Jul-06 19:07 
AnswerRe: Using of ComboBox Pin
Ed.Poore24-Jul-06 21:55
Ed.Poore24-Jul-06 21:55 
GeneralRe: Using of ComboBox Pin
Nagaraju_Focus24-Jul-06 23:55
Nagaraju_Focus24-Jul-06 23:55 
GeneralRe: Using of ComboBox Pin
Ed.Poore25-Jul-06 0:24
Ed.Poore25-Jul-06 0:24 
QuestionHow to work on .net ? Pin
asprajesh24-Jul-06 19:02
asprajesh24-Jul-06 19:02 
AnswerRe: How to work on .net ? Pin
Paul Conrad24-Jul-06 19:55
professionalPaul Conrad24-Jul-06 19:55 
QuestionNeed Latest .NET Framwork. Pin
asprajesh24-Jul-06 18:55
asprajesh24-Jul-06 18:55 
AnswerRe: Need Latest .NET Framwork. Pin
Paul Conrad24-Jul-06 19:54
professionalPaul Conrad24-Jul-06 19:54 
Questionvb.net outlook addin problem Pin
K edar V23-Jul-06 20:14
K edar V23-Jul-06 20:14 
QuestionPleaseHelp Pin
Nagaraju_Focus23-Jul-06 19:15
Nagaraju_Focus23-Jul-06 19:15 
AnswerRe: PleaseHelp Pin
Robert Rohde23-Jul-06 23:16
Robert Rohde23-Jul-06 23:16 
GeneralRe: PleaseHelp Pin
Guffa24-Jul-06 1:41
Guffa24-Jul-06 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.