Results 1 to 3 of 3

Thread: VB6.0 conversion code gives error in VB.Net 2010

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2010
    Posts
    21

    VB6.0 conversion code gives error in VB.Net 2010

    Hello,

    i have a decalre statement in vb6.0 Dim mydrvlabel As String * 256
    when i declare same thing here it gives error.

    Can you please tell what is equivalent declaration in vb.net 2010 .

    Thanks

  2. #2
    Addicted Member
    Join Date
    May 2017
    Location
    Italy
    Posts
    170

    Re: VB6.0 conversion code gives error in VB.Net 2010

    Dim mydrvlabel As String

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: VB6.0 conversion code gives error in VB.Net 2010

    That is the VB6 way of specifying a String as being a specific length. There is no specific equivalent in VB.NET. If you need this for a Windows API call or the like, look at using the VBFixedString attribute. If you don't need it for that then you don't need it at all so just use a regular String declaration.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width