Jayce Ooi’s Paradise

Photography, gaming, programming, technology, finance, anything

How is your Internet connection speed now? No more slow TM Net Streamyx? Hmm… I am still facing slowness when connect to my blogs which hosted at US. Based on Streamyx website, the connection speed should back to normal by 5 April 2009. But I did not feel that my Internet connection is back to normal. How about yours?

streamyx-turtle
Yes, you are faster than Streamyx! :P

Will start to blog actively when the connection speed is really back to normal.

Do you know to generate error information to Windows Event Log? Most of the Windows application will output error information to Windows Event Logs if there are issues in that application. How do we do that in C#?

We need to use System.Diagnostics namespace.

Codes to generate information to output to Windows Event Logs

EventLog myLog = new EventLog();
myLog.Source = “YourApplication”;
myLog.WriteEntry(“Error Description”, EventLogEntryType.Error);

Enjoy coding… ;)

How to create and delete custom event logs in Windows using C# .NET Framework? In my latest project, I need to have a custom Windows event log to keep track of all the bugs reported by my applications. Therefore, I created an application to create this custom event log file.

First of all, you need to have using System.Diagnostics; We need to use System.Diagnostics namespace to create or remove custom event logs.

Codes to create custom event logs

EventLog.CreateEventSource(“ApplicationName”, “LogName”);

These codes will create an event log called ‘LogName’ and EventSource as ‘ApplicationName’.

Codes to delete custom event logs

EventLog.Delete(“LogName”);

Hope this will help… ;)

How to modify Windows System Registry Values with C#? As usual, you need to use Microsoft.Win32 Namespace ~ using Microsoft.Win32;. Let’s take Windows Application Event Logs values as an example. I want to change the MaxSize and Retention values in Application Event Log file by using C#.

Codes to change Windows System Registry values

RegistryKey TestEventLog = Registry.LocalMachine.OpenSubKey(“System\\CurrentControlSet\\Services\\EventLog\\Application”,true);
TestEventLog.SetValue(“MaxSize”, “102367232″, RegistryValueKind.DWord);
TestEventLog.SetValue(“Retention”, “0″, RegistryValueKind.DWord);

Above codes open Application event log and with write permission (,true). It changes both MaxSize and Retention values.
Just change the codes to suit your need. ;)

XunLei English / Thunder English 5 alternative == Gigaget? Gigaget is a download manager which utilizes cutting-edge Net Grid technology that improves your download speed by 7-10 times. This quote is taken from Gigaget website. Does Gigaget really will improve your download speed? Anyway, Gigaget does look alike XunLei / Thunder 5. And the best part is that it is in English. Therefore, you do not need English language pack like the way you use XunLei.

gigaget.jpg
Gigaget in action

(more…)


Page 1 of 212Older »

Hot Topic

HTC HD2 Dell UltraSharp U2410 Review