Click here to Skip to main content
15,891,976 members
Home / Discussions / C#
   

C#

 
QuestionProblem in opening external program using C# Pin
sahadewa_kbe14-Nov-07 21:38
sahadewa_kbe14-Nov-07 21:38 
AnswerRe: Problem in opening external program using C# Pin
Christian Graus14-Nov-07 21:49
protectorChristian Graus14-Nov-07 21:49 
AnswerRe: Problem in opening external program using C# Pin
sahadewa_kbe18-Nov-07 17:02
sahadewa_kbe18-Nov-07 17:02 
Questionhow can i compare two word files bit to bit, in C# Pin
jayee714-Nov-07 21:06
jayee714-Nov-07 21:06 
AnswerRe: how can i compare two word files bit to bit, in C# Pin
Christian Graus14-Nov-07 21:29
protectorChristian Graus14-Nov-07 21:29 
QuestionHow was life before C#? Pin
kingletas14-Nov-07 20:36
kingletas14-Nov-07 20:36 
AnswerRe: How was life before C#? Pin
Christian Graus14-Nov-07 21:39
protectorChristian Graus14-Nov-07 21:39 
AnswerRe: How was life before C#? Pin
Adeel Chaudhry14-Nov-07 22:02
Adeel Chaudhry14-Nov-07 22:02 
AnswerRe: How was life before C#? Pin
Rudolf Jan15-Nov-07 0:41
Rudolf Jan15-Nov-07 0:41 
AnswerRe: How was life before C#? Pin
Luc Pattyn15-Nov-07 1:57
sitebuilderLuc Pattyn15-Nov-07 1:57 
GeneralRe: How was life before C#? Pin
kingletas15-Nov-07 9:09
kingletas15-Nov-07 9:09 
Questionhow can i send emails automatically in asp.net using C# code Pin
Rajeshwar Code- Developer14-Nov-07 20:06
Rajeshwar Code- Developer14-Nov-07 20:06 
AnswerRe: how can i send emails automatically in asp.net using C# code Pin
Albu Marius14-Nov-07 20:25
Albu Marius14-Nov-07 20:25 
GeneralRe: how can i send emails automatically in asp.net using C# code Pin
Rajeshwar Code- Developer14-Nov-07 20:30
Rajeshwar Code- Developer14-Nov-07 20:30 
GeneralRe: how can i send emails automatically in asp.net using C# code Pin
Albu Marius14-Nov-07 20:46
Albu Marius14-Nov-07 20:46 
I have used this approach in a project of mine . I created a windows service and by default this will give you 2 event handlers : OnStart & OnStop. In the OnStart you could do something like this :
protected override void OnStart(string[] args)
{
    //a handle for the Elapsed event
    Alarm.Elapsed += new ElapsedEventHandler(OnElapsedTime);
    //set the interval between 2 consecutive Elapsed events
    Alarm.Interval = SETINTERVAL; // a constant equal to 60000 ms
    //enabling the timer
    Alarm.Enabled = true;
}

The "alarm" object is an instance of System.Timers.Timer class. In the OnElapsedTime event you can check to see if the time has come to send the mails and call the appropiate method. As for the MailMessage class and how to use it I suggest using Google for the answer.

I am fighting against the Universe...
Reference-Rick Cook

GeneralRe: how can i send emails automatically in asp.net using C# code Pin
Rajeshwar Code- Developer15-Nov-07 20:02
Rajeshwar Code- Developer15-Nov-07 20:02 
AnswerRe: how can i send emails automatically in asp.net using C# code Pin
Satish - Developer15-Nov-07 0:37
Satish - Developer15-Nov-07 0:37 
QuestionHow to select the File (help me) Pin
madhugurukul14-Nov-07 19:38
madhugurukul14-Nov-07 19:38 
AnswerRe: How to select the File (help me) Pin
Christian Graus14-Nov-07 19:50
protectorChristian Graus14-Nov-07 19:50 
QuestionRe: How to select the File (help me) [modified] Pin
madhugurukul14-Nov-07 20:00
madhugurukul14-Nov-07 20:00 
GeneralRe: How to select the File (help me) Pin
Cape Town Developer14-Nov-07 21:47
Cape Town Developer14-Nov-07 21:47 
GeneralRe: How to select the File (help me) Pin
Christian Graus14-Nov-07 22:14
protectorChristian Graus14-Nov-07 22:14 
Questionhow to created object referenced by a string Pin
swheat14-Nov-07 19:34
swheat14-Nov-07 19:34 
AnswerRe: how to created object referenced by a string Pin
knodark14-Nov-07 19:41
knodark14-Nov-07 19:41 
AnswerRe: how to created object referenced by a string Pin
Christian Graus14-Nov-07 19:52
protectorChristian Graus14-Nov-07 19:52 

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.