Click here to Skip to main content
15,886,680 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Update MDB file? Pin
ElSpinos30-Jul-08 5:33
ElSpinos30-Jul-08 5:33 
QuestionSlides View Control Pin
breandan30-Jul-08 4:40
breandan30-Jul-08 4:40 
AnswerRe: Slides View Control Pin
Simon P Stevens30-Jul-08 5:37
Simon P Stevens30-Jul-08 5:37 
QuestionHow can i save event logs using C# ? Pin
Abhijit Jana30-Jul-08 3:55
professionalAbhijit Jana30-Jul-08 3:55 
AnswerRe: How can i save event logs using C# ? [modified] Pin
ElSpinos30-Jul-08 4:15
ElSpinos30-Jul-08 4:15 
GeneralRe: How can i save event logs using C# ? Pin
Tuwing.Sabado30-Jul-08 4:35
Tuwing.Sabado30-Jul-08 4:35 
GeneralRe: How can i save event logs using C# ? Pin
Abhijit Jana30-Jul-08 5:24
professionalAbhijit Jana30-Jul-08 5:24 
GeneralRe: How can i save event logs using C# ? Pin
ElSpinos30-Jul-08 5:45
ElSpinos30-Jul-08 5:45 
I don't believe the .NET Framework has native support for this, but you can try the following:

// Declare this at the class member space
[DllImport("advapi32.dll")]
static extern IntPtr OpenEventLog(string lpUNCServerName, string lpSourceName);
[DllImport("advapi32.dll")]
static extern bool BackupEventLog(IntPtr hEventLog, string backupFile);

// Somewhere in your code, call the above two declarations...
// NOTE: Replace "localhost" with the machine name you need to back up.
//       Replace "Application" with the log you are trying to back up.
//       The saved file is an EVT file.
BackupEventLog(OpenEventLog("localhost", "Application"), @"C:\TEMP\EVENTLOG.EVT");


/F - .NET Developer

GeneralRe: How can i save event logs using C# ? Pin
Abhijit Jana30-Jul-08 6:56
professionalAbhijit Jana30-Jul-08 6:56 
Questionsetting printer options Pin
cmarmr30-Jul-08 2:48
cmarmr30-Jul-08 2:48 
AnswerRe: setting printer options Pin
DaveyM6930-Jul-08 3:14
professionalDaveyM6930-Jul-08 3:14 
QuestionAfter form load Auto close window Pin
Member 387988130-Jul-08 2:38
Member 387988130-Jul-08 2:38 
AnswerRe: After form load Auto close window Pin
DaveyM6930-Jul-08 2:55
professionalDaveyM6930-Jul-08 2:55 
AnswerRe: After form load Auto close window Pin
PIEBALDconsult30-Jul-08 3:47
mvePIEBALDconsult30-Jul-08 3:47 
QuestionHide My Window Form Pin
Member 387988130-Jul-08 1:54
Member 387988130-Jul-08 1:54 
AnswerRe: Hide My Window Form Pin
DaveyM6930-Jul-08 2:54
professionalDaveyM6930-Jul-08 2:54 
AnswerRe: Hide My Window Form Pin
Ajay.k_Singh30-Jul-08 3:03
Ajay.k_Singh30-Jul-08 3:03 
AnswerRe: Hide My Window Form Pin
Thomas Stockwell30-Jul-08 10:26
professionalThomas Stockwell30-Jul-08 10:26 
QuestionHow to go to the next color? Pin
bouli30-Jul-08 1:03
bouli30-Jul-08 1:03 
AnswerRe: How to go to the next color? Pin
User 665830-Jul-08 1:06
User 665830-Jul-08 1:06 
GeneralRe: How to go to the next color? Pin
bouli30-Jul-08 1:57
bouli30-Jul-08 1:57 
AnswerRe: How to go to the next color? Pin
leppie30-Jul-08 2:30
leppie30-Jul-08 2:30 
AnswerRe: How to go to the next color? Pin
DaveyM6930-Jul-08 2:45
professionalDaveyM6930-Jul-08 2:45 
GeneralRe: How to go to the next color? Pin
ElSpinos30-Jul-08 2:58
ElSpinos30-Jul-08 2:58 
GeneralRe: How to go to the next color? Pin
bouli30-Jul-08 4:40
bouli30-Jul-08 4:40 

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.