New PAG book & tool to help learn VB6 to VB.NET migration approaches (by PaulYuk)

Published 16 November 05 03:01 PM

Jackie GoldStein, our partner and friend, just created a great post talking about the new resources created by the MS Patterns and Practices Team. 

I think these are must have assets for any team thinking about an upgrade.  Here are a few more notes from my perspective: 

  • Migration Guide -- a very helpful book covering how a development team can approach a migration to VB.NET.  This has been compiled using best practices learned by actual customers, the MS field, VB Team members like Joe Binder, and partners like Keith Pleas.  Use this to help scope out and plan your migration. 
  • VB Migration Assessment Tool -- a tool that analyzes and reports helpful metrics when you?re considering a migration.  You get things like # of lines of code/modules/classes/forms, a dependency graph, cost/time estimation tool.  Use this to help scope out and estimate the resources needed for a migration. 

All resources are available for FREE download here:

http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/VB6ToVBNetUpgrade.asp 

All other resources are available on http://msdn.com/vbrun/

Please tell me what you think about these new resources. 

Best,
Paul

Powered by the My.Blogs feature and Visual Basic 2005

 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Robert Conley said on November 17, 2005 8:57 AM:
Great guide if you are converting a database front end. But any other type of vb application it is useless particulary graphics intensive programs like CAD/CAM software.

What is needed are compatibility object that mimic VB6 objects. Plus GDI+ needs to be a lot quicker than it is now.
VB6
Dim I As Double
Const H As Double = 500
Const W As Double = 500
' ' Init
Me.ForeColor = vbBlack
Me.DrawWidth = 1

'
For I = 0 To W Step 5
Call Me.Line(I, 0)-(I, H)
Next
'
For I = 0 To H Step 5
Call C.DrawLine(0, I)-( W, I)
Next

GDI+

Dim I As Int32
Dim G As Graphics
P As Pen
Const H As Int32 = 500
Const W As Int32 = 500

' Init
G = Me.CreateGraphics
P = New Pen(Color.Black)

For I = 0 To W Step 5
G.DrawLine(P, I, 0, I, H)
Next

For I = 0 To H Step 5
G.DrawLine(P, 0, I, W, I)
Next

' Cleanup
Set P = Nothing
Set G = Nothing

VB6 Flat GDI+ Api

Dim Graphics As Long, Pen As Long
Dim I As Long
Const H As Long = 500
Const W As Long = 500

' Init
Call GdipCreateFromHDC(Me.hDC, Graphics)
Call GdipCreatePen1(Black, 1, UnitPixel, Pen)

For I = 0 To W Step 5
Call GdipDrawLineI(Graphics, Pen, I, 0, I, H)
Next

For I = 0 To H Step 5
Call GdipDrawLineI(Graphics, Pen, 0, I, W, I)
Next


' Cleanup
Call GdipDeletePen(Pen)
Call GdipDeleteGraphics(Graphics)

VB6 GDI

Dim hDC As Long
Dim I As Long
Dim pt As POINTAPI
Const H As Long = 500
Const W As Long = 500

hDC = GetDC(Me.hwnd)
For I = 0 To W Step 5
Call MoveToEx(hDC, I, 0, pt)
Call LineTo(hDC, I, H)
Next
'
For I = 0 To H Step 5
Call MoveToEx(hDC, 0, I, pt)
Call LineTo(hDC, W, I)
Next

Call ReleaseDC(hwnd, hDC)


The VB6 native graphics and GDI run about 20 times faster (a 100 loops averaging 40 milliseconds on my machine)

The VB6 flat GDI+ Api and VB.NET 8 (2005) both in a 100 loops ran about 800 milliseconds on average. I tested on several other machine as well.

This and nearly two dozen other issues is why so many of us VB6 developers are not migrating to VB.NET.

Nearly all the migration examples I have seen offered are squared toward big corporate needs of web sites and database front end. Those of us who are consultants, VARs, and independent software developers has have their upgrade path throughly trashed by Microsoft decisions regarding VB.NET.

The justifications for these decisions are increasing losing their value as technologies such as LINQ are being demonstrated.

If you can add LINQ syntax to the Visual Basic langauge there is no reason you can't support the VB6 syntax.



Rob Conley
Head Programmer
Plasma Automation

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

This Blog

Syndication

Page view tracker