A few weeks ago, I wrote a review of Visual Basic 2005 Express Edition ("VBE"). To quote myself, "In November, all the complaints about VB.NET will be history. Visual Basic 2005 Express Edition will melt away these complaints like the summer sun melts away the ice of a hard winter."
Pretty strong language, but sincerely felt!
For better or worse, Microsoft made a strategic decision to abandon the whole VB 6 world and they're not going back on that decision. But they have heard us and their response is to make VB.NET as fun and easy to do as VB 6 ever was.
Although my review was a whirlwind wrap up of a whole bunch of new things about VBE, here's a more detailed look. Specifically, we'll look at some of the new controls in VBE.
You had to spend serious money on third party software - or spend serious time putzing around with some difficult code - to get the same thing before this. Good old Microsoft is "raising the bar" and putting them "in the box" for us now.
To put things in perspective, Click Here to view the changes to the Visual Basic Toolbar itself. Notice that there are a few more default categories than there were before. This should help you find things faster right away.
Another very cool improvement is the way windows are docked in the new version. If you're like me, you've spent a while trying to dock windows, like the Toolbar, in Visual Studio 2003. "Why won't that %$#&^!!! thing snap into place!" This whole problem simply goes away in the 2005 version. The instant you start to drag windows around, a "guide diamond" appears on the screen. When the mouse pointer is over one of diamond icons, a shadow of the docked window pops up to guarantee that you don't miss the clue. It's totally foolproof! Click Here for a screenshot of what this looks like on the screen.
And there are a few more components to learn. Here's a list of the changes just in the Beta2 download:
New!
BackgroundWorker
BindingNavigator
BindingSource
ContextMenuStrip (replaces ContextMenu)
DataGridView (replaces DataGrid)
FlowLayoutPanel
MaskedTextBox
MenuStrip (replaces MainMenu)
PropertyGrid
SerialPort
SplitContainer (replaces Splitter)
StatusStrip (replaces StatusBar)
ToolStrip (replaces ToolBar)
ToolStripContainer
There are some clear trends here to notice! For example, instead of "Bar" controls, we're getting "Strip" controls in a lot of cases (ContextMenuStrip, MenuStrip, StatusStrip, ToolStrip and a new ToolStripContainer to work with them).
These new "Strip" controls have wizard capability and more options built in. For example, check out the ToolStrip control. Click Here for a screenshot of the ToolStrip control in action. Note all of the components that you can use in the ToolStrip itself.
The BackgroundWorker control gives you totally new functionality based on the .NET 2.0 Framework. This control gives you easy asynchronous capability with Windows Forms. As the 2005 documentation notes, "This method will run on a thread other than the UI (User Interface) thread." Although you can get much more complicated, a simple way to implement the control would be to:
- Hook up to its DoWork event
- When it raises an event (ProgressChanged, RunWorkerCompleted), handle the results in your code
Try THAT in your 1.1 Framework code!
The BindingNavigator control is another Framework 2.0 innovation. This gives you a better way to do simple navigation and manipulation of data on a Windows Form. Essentially, it gives you another ToolStrip control with most of the common data-related actions: adding data, deleting data, and navigating through data.
The BindingSource control gives you more power to bind a data source to controls, for example -- the new BindingNavigator! There are a whole bunch (about a dozen) controls in the VB 2003 Toolbox under the Data section that aren't in VBE. Why? With the new BindingSource functionality, you don't need all those redundant controls! To see a diagram from Microsoft showing you how that's done, Click Here.
MaskedTextBox is an example of how Microsoft decided that it was just time to do it right in Framework 2.0. About half of the books out there show you how to create a normal textbox and mask characters, for example, for a password. Probably as one more response to Microsoft's new emphasis on security, they wrapped the whole operation up into a control now.
The SerialPort control is another one that is new in Framework 2.0 and is based on a completely new SerialPort class. For a long time, we've had to "make do" with the very dated MSComm component. With the introduction of completely new serial devices, it's about time Microsoft provided an updated capability to allow us to process these devices in .NET. SerialPort is that capability.
Although these new controls will inevitably make your life easier (and help you produce more and better code), they still have to be learned. More reason to download the Beta and get cracking!
