From: George W. Barrowcliff on 25 Sep 2009 19:10 I have an application developed by someone else using VB6 that needs a few changes. Last guy is gone, so is VB6 environment. I downloaded and installed 2008 Express, then converted application. I have lots of errors (95) and 102 Warnings. I have cleared some of the errors (down to 74) but some conversions I just don't get and need some help in understanding the conversion. Thanks to anyone that takes a look and points me somewhere. GWB i.e. 'Recordset' is not a member of 'System.Windows.Forms.Label' 'DataBaseName' is not a member of 'System.Windows.Forms.Label' 'ctlRefresh' is not a member of 'AxMSGBGrid.AxDBGrid' These are repeated often and I cannot see why the wizard thinks that Recordset should be a member of System.Windows.Forms.Label Original Private Sub pgrid_size() Dim T_RS As Recordset Set T_RS = db.OpenRecordset(tn, dbOpenDynaset) Set pData.Recordset = T_RS pgrid.Refresh pgrid.Columns(0).Width = 700 pgrid.Columns(1).Width = 3500 pgrid.Columns(2).Width = 1500 pgrid.Columns(3).Width = 1500 pgrid.Columns(0).Caption = "Dr/Cr" pgrid.Columns(1).Caption = "Account Name " pgrid.Columns(2).Caption = "Debit(Rs.)" pgrid.Columns(3).Caption = "Credit(Rs.)" pgrid.RowHeight = 250 End Sub After Conversion Private Sub pgrid_size() 'UPGRADE_WARNING: Arrays in structure T_RS may need to be initialized before they can be used. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="814DF224-76BD-4BB4-BFFB-EA359CB9FC48"' Dim T_RS As dao.Recordset T_RS = db.OpenRecordset(tn, dao.RecordsetTypeEnum.dbOpenDynaset) 'UPGRADE_ISSUE: Data property pData.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="076C26E5-B7A9-4E77-B69C-B4448DF39E58"' pData.Recordset = T_RS 'UPGRADE_NOTE: Refresh was upgraded to CtlRefresh. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"' pgrid.CtlRefresh() 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Width. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(0).Width = 700 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Width. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(1).Width = 3500 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Width. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(2).Width = 1500 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Width. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(3).Width = 1500 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Caption. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(0).Caption = "Dr/Cr" 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Caption. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(1).Caption = "Account Name " 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Caption. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(2).Caption = "Debit(Rs.)" 'UPGRADE_WARNING: Couldn't resolve default property of object pgrid.Columns().Caption. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' pgrid.get_Columns(3).Caption = "Credit(Rs.)" pgrid.RowHeight = 250 End Sub
From: Scott M. on 25 Sep 2009 19:21 The fact is that "converting" VB 6 code to VB .NET is often not worth the trouble. VB .NET is not just the new version of VB, it's an entirely new language running on an entirely new Framework. As such, many of the objects you used in your old code no longer exist in VB ..NET and you will have to rewrite the applicaiton if you want to take advantage of those new objects. There is no Recordset in .NET. You'll need to come up to the new .NET data objects, known collectively as ADO .NET. -Scott "George W. Barrowcliff" <george.barrowcliff(a)flash.net> wrote in message news:ek6QuVjPKHA.1232(a)TK2MSFTNGP05.phx.gbl... >I have an application developed by someone else using VB6 that needs a few >changes. Last guy is gone, so is VB6 environment. > I downloaded and installed 2008 Express, then converted application. > > I have lots of errors (95) and 102 Warnings. I have cleared some of the > errors (down to 74) but some conversions I just don't get and need some > help in understanding the conversion. > > Thanks to anyone that takes a look and points me somewhere. > > GWB > > > i.e. > 'Recordset' is not a member of 'System.Windows.Forms.Label' > 'DataBaseName' is not a member of 'System.Windows.Forms.Label' > 'ctlRefresh' is not a member of 'AxMSGBGrid.AxDBGrid' > > These are repeated often and I cannot see why the wizard thinks that > Recordset should be a member of System.Windows.Forms.Label > > Original > > Private Sub pgrid_size() > Dim T_RS As Recordset > Set T_RS = db.OpenRecordset(tn, dbOpenDynaset) > Set pData.Recordset = T_RS > pgrid.Refresh > pgrid.Columns(0).Width = 700 > pgrid.Columns(1).Width = 3500 > pgrid.Columns(2).Width = 1500 > pgrid.Columns(3).Width = 1500 > pgrid.Columns(0).Caption = "Dr/Cr" > pgrid.Columns(1).Caption = "Account Name " > pgrid.Columns(2).Caption = "Debit(Rs.)" > pgrid.Columns(3).Caption = "Credit(Rs.)" > pgrid.RowHeight = 250 > End Sub > > After Conversion > Private Sub pgrid_size() > > 'UPGRADE_WARNING: Arrays in structure T_RS may need to be initialized > before they can be used. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="814DF224-76BD-4BB4-BFFB-EA359CB9FC48"' > > Dim T_RS As dao.Recordset > > T_RS = db.OpenRecordset(tn, dao.RecordsetTypeEnum.dbOpenDynaset) > > 'UPGRADE_ISSUE: Data property pData.Recordset was not upgraded. Click for > more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="076C26E5-B7A9-4E77-B69C-B4448DF39E58"' > > pData.Recordset = T_RS > > 'UPGRADE_NOTE: Refresh was upgraded to CtlRefresh. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"' > > pgrid.CtlRefresh() > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Width. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(0).Width = 700 > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Width. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(1).Width = 3500 > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Width. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(2).Width = 1500 > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Width. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(3).Width = 1500 > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Caption. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(0).Caption = "Dr/Cr" > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Caption. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(1).Caption = "Account Name " > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Caption. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(2).Caption = "Debit(Rs.)" > > 'UPGRADE_WARNING: Couldn't resolve default property of object > pgrid.Columns().Caption. Click for more: > 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' > > pgrid.get_Columns(3).Caption = "Credit(Rs.)" > > pgrid.RowHeight = 250 > > End Sub > > > >
From: zp18 on 25 Sep 2009 19:56 <Snip!> Is the alternative going back to VB6? I'm OK with that since at this time only a few minor changes are needed. I thought that the Express VB product would do the job but I have spent a ton of time in trying to get this converted. Since the VB6 environment is gone also, cd's, books, etc. I will need to find a copy somewhere on the used market if it exists. Thanks for your quick answer. GWB
From: Armin Zingler on 25 Sep 2009 19:56 George W. Barrowcliff schrieb: > I have an application developed by someone else using VB6 that needs a few > changes. Last guy is gone, so is VB6 environment. > I downloaded and installed 2008 Express, then converted application. > > I have lots of errors (95) and 102 Warnings. I have cleared some of the > errors (down to 74) but some conversions I just don't get and need some help > in understanding the conversion. In addition to Scott (I agree with him): The application must be compilable in VB6 on the machine that you use to convert it. Otherwise the preconditions to convert it are not met. (if it wouldn't even run in VB6, how could it in VB.Net?) IMO, one should know both languages well to do the conversion. -- Armin
From: Nobody on 25 Sep 2009 22:36
"zp18" <irvinepogi(a)gmail.com> wrote in message news:e52e58a5-7128-47da-a271-1d17262ab041(a)a37g2000prf.googlegroups.com... > Since the VB6 environment is gone also, cd's, books, etc. I will need > to > find a copy somewhere on the used market if it exists. VB6 is still available to MSDN Subscribers. Visual Studio 6, including VC6 are not. |