Windows Forms Articles

TraceListener creates huge log files

TraceListener creates huge log files If you've used the .Net trace listeners, you'll know that they just keep appending to the file specified in the App.Config file, this can lead to some massive log files! Here's a simple TraceListener that logs to a new file for every day.

Lee Keable - 11,540 views

Missing App.Path

Missing App.Path If you have the need to load resources (XSL stylesheets, images etc etc) at runtime, you may need to know the path of the currently executing code. In VB6 you'd just use good old App.Path, here is the .Net equivalent.  using System.IO;  string&n

Lee Keable - 3,894 views

Updating controls from another thread

Updating form controls from another thread. Form controls, by default, can only be updated by the forms thread. Otherwise an invoke must be used. The example below shows a simple logging function that can be called by threads other than the forms. delegate void LogSa

Dave Howard - 5,036 views

System tray and balloon tips

Balloon Tips from the System Tray You can really easily add system tray function to .NET windows forms by dragging the NotifyIcon object onto your form. You can then use this to display balloon tips from the system tray with the code below: myNotifyIcon.ShowBalloonTip(500,&nbs

Dave Howard - 31,047 views