Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  How to convert VB6 Type To .NET Structure (Monday, January 02, 2006)




Found the following interesting discussion in the Newsgroups:

Convert VB6 Type To .NET Structure
by:Anonymous

Good Day All,

I have the following VB6 Type

Type IAListRecordType
lID As Long
strName As String * IALISTSTRSIZE
End Type

I need to convert this to VB .NET. How do I do this? I have come up with

Structure IATaskListRecordType
Dim lID As Long
Dim strName As String * IATASKLISTSTRSIZE
End Structure

However, the * IATASKLISTSTRSIZE will not compile. I get a message


Any suggestions would be appreciated. Thanks!

Dan


 Reply:
by:One Handed Man \( OHM - Terry Burns \)

 The syntax is incorrect, what are you expecting to happen with this line.?


 Reply:
by:Ken Tucker [MVP]

 Hi,

The dotnet integer is the same as the old long. Replace any longs with
integers.

Structure IATaskListRecordType
Dim lID As Integer
<VBFixedString(IATASKLISTSTRSIZE)> Dim strName As String
End Structure

Ken


 Reply:
by:Anonymous

 Ken,

Thanks for the quick response. That did the trick. I really appreciate it.

Dan








0 Comments:

Post a Comment

 
Previous Posts
    - How to create a suimple virtual directory with def...
    - Multi column listboxes
    - Unicode to MS-DOS Cyrilic (code page 866)
    - Vb.net 2003 Get Text File
    - Program upgrades
    - RE: SQLCE Problem on Create Table
    - Q:Importing an Excel file into a VB application
    - Vb.net 2003 Get Text File
    - Changing design/apperance in excel from VB.NET
    - Visual Basic.net

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006

Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland