Cool Controls for Windows Forms!

Robert Green blogs about the release of the VB.NET PowerPack. The PowerPack is a set of 7 cool new Windows Forms controls written in Visual Basic.NET. Don't let the “VB“ in the title or your own language bias fool you, you can use these controls in any .NET language. You can download the controls from the GotDotNet workspace. My favorite control is the NotificationWindow control, which you've seen in MSN Messenger, SharpReader and several other applications. The code below creates a notification window, that when clicked, changes the label on a form.

 private void Form1_Load(object sender, System.EventArgs e)

{

     //Create Toast

     NotificationWindow toast = new NotificationWindow();

     toast.TextIsHyperLink = true;

     toast.ShowStyle = NotificationShowStyle.Slide;

               

     //Create Message for 6K milliseconds

     toast.Notify("Hello World!", 6000);

     toast.Click += new NotificationWindow.ClickEventHandler(toast_Click);

          

}

private void toast_Click(object sender, EventArgs e)

{

     //Event fires when a user clicks on the toast

     label1.Text = "You clicked Hello World";

}

If you are a true language snob (shame on you) and don't want to use these b/c it's called a VBPowerPack, you can always use a using alias at the top of your file as shown below: 

using PowerPack = VbPowerPack;