views:

90

answers:

1

We migrated from VB 6 to VB.NET 2008. Convertion went fairly well. There is one issue with exception.

The following line in the InitializeComponent throws exceptions.

Me.dirSelector = New Microsoft.VisualBasic.Compatibility.VB6.DirListBox

The exception message says that "Invalid Property value". It happens only once. After that everything seems to be working.

declaration as follows

Public WithEvents dirSelector As Microsoft.VisualBasic.Compatibility.VB6.DirListBox

what could be the issue?

Regards,

Krish

A: 

There are most likely some property assignments to dirSelector properties in InitializeComponent (dirSelector.left = ..., etc). I would guess that it's one of these that is being flagged, and since it occurs during initialization you don't get the normal yellow line in the debug mode. Try commenting these out or changing their values to see if that's the problem.

xpda