Vb6 – Vb.net Conversion In Vs2008 Sp1

Hi all

The objective
*************

I would like my vb6 code (which works!) to compile successfully in Vb.net.

44 critical errors are identified in the automated conversion once I include a missing reference and 10 are unique. The 10 unique errors are shown below.

The deal
********

I will send the source vb6 code and the vs2008 code to the winner. I will not be posting it to bidders . You must demonstrate the compiled vb.net code and send the completed code before the project is finished.

I will own the copyright to the code at all times.

The issues
**********

I have converted a vb6 project to Vb.net in VS2008 SP1. I have only a few unique errors although some of these occur multiple times:

1) name “commondialog1” is not declared

Sub PrintGraph_Click()

PrintBW.Visible = False
CloseButton.Visible = False

‘UPGRADE_ISSUE: Constant cdlPDReturnDC was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”55B59875-9A95-4B71-9D6A-7C294BF7139D”‘
‘UPGRADE_ISSUE: MSComDlg.CommonDialog property CommonDialog1.Flags was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
CommonDialog1.Flags = MSComDlg.PrinterConstants.cdlPDReturnDC

2) Current x is not a member of system.windows.forms.panel and
3) Current y is not a member of system.windows.forms.panel

Sub DrawBar(ByRef Trait As String, ByRef Relat As String, ByRef PercentScore As Object, ByRef R As Short, ByRef G As Short, ByRef B As Short)

If Trait = “Emotional” Then
If Relat = “” Or Relat = “C” Then
‘UPGRADE_ISSUE: PictureBox property Graphs.CurrentX was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
GraphOutput.Graphs.CurrentX = 0
‘UPGRADE_ISSUE: PictureBox property Graphs.CurrentY was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
GraphOutput.Graphs.CurrentY = 50

4) Line is not a member of system.windows.forms.panel

‘UPGRADE_ISSUE: PictureBox property Graphs.CurrentY was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
‘UPGRADE_WARNING: Couldn’t resolve default property of object PercentScore. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”6A50421D-15FE-4896-8A1B-2EC21E9037B2″‘
‘UPGRADE_ISSUE: PictureBox property Graphs.CurrentX was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
‘UPGRADE_ISSUE: PictureBox method Graphs.Line was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
GraphOutput.Graphs.Line ((GraphOutput.Graphs.CurrentX + 71.4 * CShort(PercentScore)), (GraphOutput.Graphs.CurrentY + 450)), RGB(R, G, B), BF

5) End of statement expected

‘UPGRADE_ISSUE: PictureBox property Graphs.CurrentY was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
‘UPGRADE_WARNING: Couldn’t resolve default property of object PercentScore. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”6A50421D-15FE-4896-8A1B-2EC21E9037B2″‘
‘UPGRADE_ISSUE: PictureBox property Graphs.CurrentX was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
‘UPGRADE_ISSUE: PictureBox method Graphs.Line was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
GraphOutput.Graphs.Line ((GraphOutput.Graphs.CurrentX + 71.4 * CShort(PercentScore)), (GraphOutput.Graphs.CurrentY + 450)), RGB(R, G, B), BF

‘[Step] (x1, 1) [Step] (x2, y2), [color], [B][F]

End Sub

6) As any is not supported in declare statements

‘UPGRADE_ISSUE: Declaring a parameter ‘As Any’ is not supported. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”FAE78A8D-8978-4FD4-8208-5B7324A8F795″‘
Private Declare Function SendMessage Lib “user32” Alias “SendMessageA”(ByVal hwnd As Integer, ByVal Msg As Integer, ByVal wp As Integer, ByRef lp As Any) As Integer

Private Declare Function CreateDC Lib “gdi32” Alias “CreateDCA”(ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As Integer, ByVal lpInitData As Integer) As Integer

‘UPGRADE_ISSUE: Declaring a parameter ‘As Any’ is not supported. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”FAE78A8D-8978-4FD4-8208-5B7324A8F795″‘
Declare Function OSWinHelp Lib “user32” Alias “WinHelpA”(ByVal hwnd As Integer, ByVal HelpFile As String, ByVal wCommand As Short, ByRef dwData As Any) As Short

7) Hdc is not a member of microsoft.visualbasic.powerpacks.printing.compatibility.vb6.printer

Public Function WYSIWYG_RTF(ByRef RTF As System.Windows.Forms.RichTextBox, ByRef LeftMarginWidth As Integer, ByRef RightMarginWidth As Integer) As Integer
Dim Printer As New Printer

Dim LeftMargin, LeftOffset, RightMargin As Integer
Dim LineWidth As Integer
Dim PrinterhDC As Integer
Dim R As Integer
‘ Start a print job to initialize printer object

‘Printer.Print Space(1)
‘Printer.ScaleMode = vbTwips

‘ Get the offset to the printable area on the page in twips

‘UPGRADE_ISSUE: Printer property Printer.hdc was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
LeftOffset = Printer.ScaleX(GetDeviceCaps(Printer.hdc, PHYSICALOFFSETX), ScaleModeConstants.vbPixels, ScaleModeConstants.vbTwips)

8) Drivername is not a member of microsoft.visualbasic.powerpacks.printing.compatability.vb6.printer

‘UPGRADE_ISSUE: Printer property Printer.DriverName was not upgraded. Click for more: ‘ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword=”CC4C7EC0-C903-48FC-ACCC-81861D12DA4A”‘
PrinterhDC = CreateDC(Printer.DriverName, Printer.DeviceName, 0, 0)

9) Update_click is not a member of sis.keydisplay

KeyDisplay.Update_Click(Nothing, New System.EventArgs())

10) Newindex is not a member of system.windows.forms.combobox

For x = 0 To MainForm.ClientData.NewIndex

Leave a Reply

Your email address will not be published.