Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 25th, 2007, 08:29 PM
Authorized User
 
Join Date: Feb 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, thanks to your help I finally got this thing figured out.

I did as you suggested and created a file in VB.NET with the same parameters as the one created in VB5. There were not alike. The string parts matched but the number of boxes and spaces were very different. One thing I noticed was that the VB5 file had 2 boxes where an integer belonged between strings and the VB.NET had 4 boxes. That got me to thinking that the Integer type in VB5 was not the same as the Integer type in VB.NET. As you may recall from one of my previous posts the original VB5 code that created had the following Type:

Public Type OWNER
    RecordNum As Integer
    DateOfPurch As Long
    RegNum As String * 9
    UsesRemaining As Integer
    VersionNum As Integer
    DiskSize As String * 2
    DiskCount As Integer
    DateMade As String * 3
    VersionName As String * 4
End Type

In creating the structure in VB.NET I changed all the Integer types to Int16 and the Long to Integer. Also the value in the RegNum string did not have 9 characters but was actually an empty string. So to make it work I had to supply a string of 9 spaces. With those changes it worked perfectly.

Thank you so much for your help.

 
Old July 5th, 2007, 05:39 AM
Registered User
 
Join Date: Jul 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What should be the vb.net 2.0 structure for the following vb6 Type
Private Type AnRec
 date As Integer
 groupno As Byte
 mean As Byte
 titerType(1) As Single
 titer As Single
 blindVal(1) As Single
 protFactor(1) As Single
 name As String * 30
End Type






Similar Threads
Thread Thread Starter Forum Replies Last Post
VB5.0 to VB .Net upgradation issue related to DAO setu VB How-To 1 October 10th, 2007 03:15 PM
display random items from xml file rahimzai XML 2 November 26th, 2006 06:47 PM
Help: dropdownlist posting back gives random data vickeyurs ADO.NET 5 September 3rd, 2005 09:28 AM
Do VB5 and Access 2003 play together? zontar Beginning VB 6 1 March 8th, 2005 09:58 AM
random file generation Ashleek007 Beginning PHP 1 February 24th, 2005 03:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.