Ziff Davis EnterpriseDevLife
Advertisement

Friday, September 14, 2007 8:04 PM/EST

Visual Basic finally gets the LINE back!

One of the pet peeves with VB6 developers moving to .NET Windows forms was that we lost the ability to draw a simple line or shape on a form. There were all kinds of tricks - most common I believe was to draw something like a group box and flatten it so it's height is 0. Bah!

As I've mentioned before, I am subscribed to the MSDN Download Notifications and I saw this in today's email:

Visual Basic 2005 Power Packs 2.0
Microsoft Visual Basic 2005 Power Packs 2.0 includes a new set of Line and Shape controls and updated versions of the two previously released Visual Basic 2005 Power Packs: the PrintForm Component and the Printer Compatibility Library.

It will now be easier to bring over printer code since the components for printing are very different in .NET. This was a really hard transition for a lot of VB6 folks and I remember that it required a lot of discussion in the PAG Guide that was written for VB6 devs moving to .NET.

I think these are two nice additions to ease the transition for developers who have so much investment in VB6 and are wanting to finally move to .NET and bring some of their code along for the ride.

A little more detail from the download page.

The new Line and Shape controls included in this version of the Visual Basic 2005 Power Packs are a set of three graphical controls that enable you to draw lines, ovals, and rectangles on forms and containers at design time making it much easier to enhance the look of your user interface. These new shape controls also provide events such as click and double-click allowing developers to respond and interact with end users.

The Printer Compatibility Library allows projects that used the Printer and Printers Collection in Visual Basic 6.0 to be upgraded without having to re-write your printing logic. By simply adding a reference to the library, declaring a Printer and making a few minor syntax changes, your project will be able to print using the Printers collection and Printer object as it did in Visual Basic 6.0. This version adds a new Write method to the Printer object which allows you to print text without a forced carriage return similar to the semicolon syntax used by Print method in Visual Basic 6.0.

The PrintForm component is designed to bring back the ability to easily print a Windows Form. With this the new PrintForm component you can once again layout the Windows Form exactly as you want it and allow your users to print the form as a quick report

TrackBack

TrackBack

http://blogs.devsource.com/cgi-bin/mte/mt-tb.cgi/11728

Post a Comment

 
 

Advertisement

Syndication

Subscribe: