Posts Tagged ".NET Programming"

ASP.NET Variables Won’t Hold Their Value

When it comes to working with ASP.NET most developers who have done standard desktop development always run into the problem of their class variables not retaining their values. You create a variable at the class/page level and expect that when you click a button or change a server control on the page that those variables will be there when its event is triggered. But in many cases they are not ...

Passing Data Between Forms – Using Delegates and Events

Back in an article I wrote in 2010 titled "Passing Data Between Forms in C# or VB.NET", I described one of a couple methods for passing data between two forms in a .NET forms project. One method was to publicly expose a method on a child form that the parent form could then call on when needed. At the same time I also mentioned, and advised against, using a public ...

Quick Tutorial: Building Menus Dynamically With the MenuStrip Control in C#

One of the easiest ways to build a menu on Winforms is by simply dragging and dropping a MenuStrip control from the toolbox on your form and then go to town filling in menu text and attaching events. Most of the time this is the way to go and works for the majority of programs out there. What we will cover this time around is just a few examples of ...

Drawing Analog Style Clocks in VB.NET

A number of years ago I showed an example of creating a typical digital clock using picture numbers and a little bit of VB.NET code. Fast forward to today and I have decided to show you an example of creating an analog style clock in VB.NET 2012. These types of clocks you may know very well. They are the ones with the hands and the ones your watch is probably ...

Book Review: C# 5.0 In a Nutshell

Today's book review is on C# 5.0 in a Nutshell: The Definitive Reference by Joseph Albahari and Ben Albahari and published by O'Reilly. This book makes up like my 5th or so O'Reilly book and I find the book publisher really publishes smashing hits or hot messes. I never found ones that were in the middle. But not to worry, this book is one of the good guys! At roughly ...

Stash Data Away in Controls With the Tag Property Using VB.NET

One of the most underutilized properties of any control is a property called "tag". What does it do? Does it cure world hunger? Does it save the planet from annihilation? I would probably say no on both counts, but it does have a bit of a mystique that beginners may not be fully aware of. In design mode of Visual Studio if you select a control, a button or text ...