Results 1 to 19 of 19

Thread: VB6 functionality in .NET

  1. #1

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330
    Good to hear that they listen to us

    MS Restores VB6 Functionality to VB.NET

    Microsoft announced today that it's making changes to Visual Basic.NET to make it more compatible with VB6.
    While VB.NET includes many features developers have long requested, including inheritance, better threading, and structured error handling, the new features come at the price of changes to VB's core syntax.

    Given the tremendous pressure felt throughout Microsoft to ship .NET Framework and Visual Studio.NET, making fundamental changes at this point is a significant concession to core VB users.

    These changes will all be implemented in the Visual Studio.NET Beta 2, Ari Bixhorn, Microsoft Visual Basic Product Manager, informed VBITS and VBPJ. Changes include:

    *The Value of True: In VB6, when True is coerced to a signed integer, the result is -1. For consistency with other .NET languages, VB.NET was going to change the value of True to 1. Instead, it will be left at -1. Note that when a True value is passed from VB.NET to other .NET
    languages, it will be passed as 1.

    *Behavior of Boolean Operators: Microsoft intended to change And, Or, Not, and XOr to logical-instead of bitwise-operators, with new operators taking over bitwise duties. These have been restored to their previous functionality, both logical and bitwise, as has operator precedence. In addition, a planned short-circuiting capability has been removed from these operators, and has been reassigned to new operators: AndAlso and OrElse.

    *Declaring Arrays: For consistency with other languages, Microsoft intended to change the way VB declared arrays, so that you would specify the number of elements in the array: Dim a(10) As Integer would
    create a ten-element array, with an upper bound of 9. This conflicts with the VB style of declaring arrays, where Dim a(10) As Integer creates an eleven-element array with an upper bound of 10. The traditional declaration technique has been restored.

    Says Bixhorn, "These changes are really for [developers] maintaining an existing code base and doing new development. They want consistency.
    They don't want to have to look at a line of code and have to remember whether it's correct for .NET or VB6."

    According to Bill Vaughn, President of Beta V Corporation "Microsoft is delivering a very powerful toolset in Visual Basic.NET. By responding to feedback from the Visual Basic community, they will provide a more seamless transition from programming in VB6 to Visual Basic.NET."
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Im not a part of this us you mention.

    This is dumb. They keep it up and VB will be pushed right out of the .NET initiative because it wont be compatable anymore.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3
    Lively Member
    Join Date
    Dec 1999
    Posts
    106
    Dead right Cander.
    The array dimensioning in VB always really irked me, this is a really good opportunity to get rid of some of the crap from VB & I hope they use it properly ....

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Not to mention -1 = TRUE. That i retarded and I cant believe some VB users bitched about changing it to 1.

    no wonder VB programmers get laughed at by other language programmers. alot of us are little whinny babies that dont want to learn and grow.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    In relation to the boolean true, I always just used Abs() to make sure the value ends up as either 0 or 1.

    Simple.

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  6. #6

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Me not part of this either

    I just posted this to point out that there sadly enough still are developers who fear progress. I completely agree with you that arrays should be 0-boud and that vb.NET should be pushed in the new direction that they started with.

    The
    Good to hear that they listen to us
    part is what was stated in the mail that I received with this information.

    The was just to ironic.

    I hope that MS return to the path they set up when creating .NET
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  7. #7
    grigp
    Guest

    Exclamation

    I think that in most cases we'll be forced to rewrite the existing projects in VB6.
    So, I think that the recent announced changes will not affect us.

    best regards
    grig

  8. #8
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    disappointing

    I wonder how much theyre going to change, i don't want another vb6.
    This conflicts with the VB style of declaring arrays, where Dim a(10) As Integer creates an eleven-element array with an upper bound of 10. The traditional declaration technique has been restored.
    I've always been against this idea with upper and lower bounds, amount of elements makes a lot more sense, and each time you assign a variable the upperbound, you have to use -1 as a value for no elements, which is sick. For loops still the same i guess, or have they changed them?
    Instead, it will be left at -1
    I can't think of anything more annoying.
    Microsoft intended to change And, Or, Not, and XOr to logical-instead of bitwise-operators, with new operators taking over bitwise duties.
    I'd say this would have been better, users many times mix boolean logics with bitwise operations, and often can't determine which is applying from case to case because of implicit convertions that you can't clarify but with testing. A huge source of bugs to developers.
    In addition, a planned short-circuiting capability has been removed from these operators, and has been reassigned to new operators: AndAlso and OrElse.
    What were they intending to do with And and Or operators earlier? They couldn't have replaced them because Or and And are nessesary for processing functions that might change values used later, which will not if included in short circuit operators.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  9. #9
    Lively Member
    Join Date
    Dec 1999
    Posts
    106

    Re: disappointing

    Originally posted by kedaman
    I wonder how much theyre going to change, i don't want another vb6.
    I had a quick, and I mean quick, look at the Beta and it does seem radically different. I remeber being mightily impressed with VB5 when it came out and there seems to be an even bigger change coming now.
    I was wondering are there any others here with Java experience and if so what they make of .NET. Having moved over to Java over a year ago I am very interested in seeing how this progresses, I wonder will I be back in the MS camp doing VB or C# anytime soon ...

  10. #10
    Jordan
    Guest
    I like the fact that Microsoft finally found their brains with the array thing. That was one of my main concerns with the .Net version of VB. Recoding all my apps, which use an extensive number of arrays, would have been a real pain in the you know what.

  11. #11
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I don't expect it to be less than radically different, i'm just conserned that Microsoft prefered backwards compability
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  12. #12
    Addicted Member jeroenh's Avatar
    Join Date
    Aug 2000
    Location
    Rotterdam, Holland
    Posts
    201

    It doesn't matter

    What ever Bill can come up with, wther we like it or not, it doesn't matter for the success that VB.Net is going to be.

    It might be a problem with the other .Net tools, but the plus of VB is the easy syntax.
    I work for the goverment and I alone make about 50 seperate programs a year in VB. I couldn't have done it in any other language, beacause of the ease to develop.

    Maybe C# will take this problem away, being a combination of VB and C, but when VB.Net doesn't become a success then VB6 will keep running in it's place. This way Microsoft has a backup and programs can still be made quickly and with ease.

    I personaly think I will go over to C#. Providing it is stable enough.

    Catch you later,

    Jeroen Hoekemeijer
    Code:
    If 1 = 2 Then MajorError

  13. #13
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Smile Boolean TRUE value

    I generally agree with all other things VB.NET is improving upon from VB6 with the exception of boolean TRUE value becomming 1 (instead of -1).

    OK, many other languages use 1 for true but mathematically speaking, -1 is true, not 1.

    Not that it's a big problem anyway, using 'True' and 'False' constants when working with boolean expressions is much more 'user friendly' anyway.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  14. #14
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    mathematically speaking? correct me if i'm wrong, but I don't think you do combine boolean and numeric aritmetics but in programming languages?!
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  15. #15
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    I dont think ive ever seen -1 as true in maths ...
    Ive always used +1...
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  16. #16
    Addicted Member OsirisX's Avatar
    Join Date
    May 2002
    Location
    Montgomery, AL
    Posts
    132

    Hm

    True being -1 always made sense to me...
    Ever since I saw it in an INI file...I forget which one, but this was a long while back...it was like...

    DoTimes=5
    ;Set DoTimes to -1 to go forever.

    Hm...And...It made sense...except.. you can't always do something an infinite number of times in VB though...but it still means "ON"...
    0 means to do it none times, and that makes sense for boolean...and -1 does it infinite times...because their counter will never = -1 (it keeps adding)...I hope everyone follows.

    I realize it doesnt follow other languages, but I think it makes sense.
    --OsirisX
    AIM, Yahoo: OsirisX11
    ICQ: 56697525
    MSN: [email protected]

  17. #17
    Addicted Member
    Join Date
    Apr 2002
    Posts
    235

    Re: Hm

    Originally posted by OsirisX
    True being -1 always made sense to me...
    Ever since I saw it in an INI file...I forget which one, but this was a long while back...it was like...

    DoTimes=5
    ;Set DoTimes to -1 to go forever.

    Hm...And...It made sense...except.. you can't always do something an infinite number of times in VB though...but it still means "ON"...
    0 means to do it none times, and that makes sense for boolean...and -1 does it infinite times...because their counter will never = -1 (it keeps adding)...I hope everyone follows.

    I realize it doesnt follow other languages, but I think it makes sense.
    Huh. This doesn't make any sense to me. It sounds like you're saying that in VB you can do something like this:

    dim DoTimes as Integer
    DoTimes = -1

    while (DoTimes)
    'do stuff
    wend

    That will loop forever, but it will also loop forever if DoTimes is any number other than 0. Which makes the whole question of -1 = True or 1 = True moot. They're both true in VB6 (uh, ok VB5 actually - I assume it's the same for VB6), and it's probably true for VB.NET.

    Microsoft pulled a fast one on that!

  18. #18
    Addicted Member OsirisX's Avatar
    Join Date
    May 2002
    Location
    Montgomery, AL
    Posts
    132
    Just...nevermind..
    --OsirisX
    AIM, Yahoo: OsirisX11
    ICQ: 56697525
    MSN: [email protected]

  19. #19
    Addicted Member
    Join Date
    Apr 2002
    Posts
    235
    sorry...

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