Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old April 25th, 2007, 08:29 PM
Authorized User
 
Join Date: Feb 2007
Location: Flowery Branch, GA, USA.
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.

Reply With Quote
  #12 (permalink)  
Old July 5th, 2007, 05:39 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 05: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 08:58 AM
random file generation Ashleek007 Beginning PHP 1 February 24th, 2005 02:20 AM



All times are GMT -4. The time now is 03:42 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.