Click here to Skip to main content
15,895,709 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to implement Keybord shortcuts in a C# window application Pin
Seraph_summer8-Dec-08 23:53
Seraph_summer8-Dec-08 23:53 
GeneralRe: how to implement Keybord shortcuts in a C# window application Pin
Giorgi Dalakishvili8-Dec-08 23:55
mentorGiorgi Dalakishvili8-Dec-08 23:55 
QuestionShould side-effect free function using Properties? Pin
calendarw8-Dec-08 17:58
calendarw8-Dec-08 17:58 
AnswerRe: Should side-effect free function using Properties? Pin
Vikram A Punathambekar8-Dec-08 18:57
Vikram A Punathambekar8-Dec-08 18:57 
QuestionCant see output to Event log with log4net EventLogAppender. Pin
Chintan.Desai8-Dec-08 17:25
Chintan.Desai8-Dec-08 17:25 
AnswerRe: Cant see output to Event log with log4net EventLogAppender. Pin
Giorgi Dalakishvili8-Dec-08 19:22
mentorGiorgi Dalakishvili8-Dec-08 19:22 
GeneralRe: Cant see output to Event log with log4net EventLogAppender. Pin
Chintan.Desai8-Dec-08 22:34
Chintan.Desai8-Dec-08 22:34 
QuestionEvent Log Madness - Changing the log associated with a log Pin
prod@pt8-Dec-08 14:28
prod@pt8-Dec-08 14:28 
Hi,

I have created an entry in a custom event log:

if (!EventLog.SourceExists("TestSource"))
   EventLog.CreateEventSource("TestSource", "System");
EventLog evtLog = new EventLog();
evtLog.Source = "TestSource";
evtLog.WriteEntry("This is a test", EventLogEntryType.Information); 

I now decide to use my own custom log so I change "System" to "TestLog".

This doesn't do anything. The event is still logged to the "System" log even if I try deleting the source but if I use a different source, it then gets logged correctly to "TestLog"

if (EventLog.SourceExists("TestSource"))
   EventLog.DeleteEventSource("TestSource");

If I go into the registry, I find a list of sources for the System event log but even if I delete the TestSource entry from there it still logs events to the System event log.

This MSDN article suggests that you can remove a source association from a log but it's not correct as far as I can tell:

http://msdn.microsoft.com/en-us/library/k57466fc(VS.71).aspx[^]

What's going on? It seems that once a source is associated with a log there's no way of removing that association.
AnswerRe: Event Log Madness - Changing the log associated with a log Pin
Chintan.Desai8-Dec-08 19:09
Chintan.Desai8-Dec-08 19:09 
Questionvalidation of class attributes Pin
devvvy8-Dec-08 14:05
devvvy8-Dec-08 14:05 
AnswerRe: validation of class attributes Pin
PIEBALDconsult8-Dec-08 14:17
mvePIEBALDconsult8-Dec-08 14:17 
GeneralRe: validation of class attributes Pin
devvvy8-Dec-08 14:27
devvvy8-Dec-08 14:27 
GeneralRe: validation of class attributes Pin
PIEBALDconsult8-Dec-08 14:34
mvePIEBALDconsult8-Dec-08 14:34 
AnswerRe: validation of class attributes Pin
N a v a n e e t h8-Dec-08 16:27
N a v a n e e t h8-Dec-08 16:27 
GeneralRe: validation of class attributes Pin
devvvy8-Dec-08 17:11
devvvy8-Dec-08 17:11 
GeneralRe: validation of class attributes Pin
N a v a n e e t h8-Dec-08 19:58
N a v a n e e t h8-Dec-08 19:58 
Questionderived class to automatically call base method before "return" Pin
devvvy8-Dec-08 13:56
devvvy8-Dec-08 13:56 
AnswerRe: derived class to automatically call base method before "return" Pin
PIEBALDconsult8-Dec-08 14:12
mvePIEBALDconsult8-Dec-08 14:12 
AnswerRe: derived class to automatically call base method before "return" Pin
Christian Graus8-Dec-08 14:14
protectorChristian Graus8-Dec-08 14:14 
AnswerRe: derived class to automatically call base method before "return" Pin
Thomas Weller9-Dec-08 3:12
Thomas Weller9-Dec-08 3:12 
QuestionHow can I get "Struct's address"~ help me~ Pin
G.I Cho8-Dec-08 13:03
G.I Cho8-Dec-08 13:03 
GeneralRe: How can I get "Struct's address"~ help me~ Pin
Luc Pattyn8-Dec-08 13:24
sitebuilderLuc Pattyn8-Dec-08 13:24 
GeneralRe: How can I get "Struct's address"~ help me~ Pin
G.I Cho8-Dec-08 18:39
G.I Cho8-Dec-08 18:39 
Questionembed .net component to program Pin
saeed70078-Dec-08 11:11
saeed70078-Dec-08 11:11 
AnswerRe: embed .net component to program Pin
EliottA8-Dec-08 11:28
EliottA8-Dec-08 11:28 

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.