Results 1 to 18 of 18

Thread: VB 7 Predictions

  1. #1
    Guest

    Talking

    I'm looking forward to VB7, but MS doesn't wanna say anything about it (well, almost).
    So, does anyone know what new features will be included in VB7 (or Visual Studio.net)?

    (Besides the tray icon control, I heard that from a friend)

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    shouldn't this be posted in the chit chat section?

  3. #3
    Hyperactive Member Emo's Avatar
    Join Date
    Jul 2000
    Posts
    428

    Thumbs up

    I saw a 40 min video-presentation that MS had, back in Feb and I remember them saying that VB7 will be using DHTML stuff a lot more, and Internet related things...I'll try to find the link to the video so you guys can see it...
    -Emo
    -=VB6 Enterprise Edition=-
    -=VC++6Enterprise Edition=-
    «¤E³m°O²™¤»

  4. #4
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    Encapsulation, Inheritance, Polymorphism, Threading.
    Courgettes.

  5. #5
    Guest
    What's polymorphism?

  6. #6
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    The ability for a class to inherit from more than one other class.

    I think.

    Courgettes.

  7. #7
    Guest
    This is polymorphism

    Code:
    Public Function MyFunc(Arg1 As Long, Arg2 As Long) As Long
        MyFunc = Arg1 + Arg2
    End Function
    
    Public Function MyFunc(Arg1 As String, Arg2 As String, Arg3 As String) As String
        MyFunc = Arg1 & Arg2 & Arg3
    End Function
    They have the same name, but they work completely different(you can have as many as you like, but they all have to have different arguments).

    when I first heard of polymorphism I thought it had something to do with image manipulations

    V(ery): dont you mean Multi-Threading??
    and BTW I have always wondered this, what are the advantages of having more than one thread?
    why do you need it?
    Delphi is multithreaded, and you can create a thread using API, but what does this do?
    does it allow you to do two things at the same time?
    for example

    Code:
    Thread Thingy ma-bobber #1
    Do this
    
    Thread Thingy ma-bobber #2
    Do that at the same time that you are doing this

    ???

    [Edited by denniswrenn on 09-02-2000 at 02:28 PM]

  8. #8
    Guest
    I don't know about multi-threading, but polymorphism looks cool:
    Code:
    Sub SomeRoutine(Arg1)
        'Some stuff...
    End Sub
    Static Function SomeRoutine(Arg1 As Long, Arg2 As String) As String
        'Some other stuff...
    End Function
    So if for example I call SomeRoutine like this:
    Code:
    A$ = SomeRoutine(2, "Cool")
    Call SomeRoutine(Now)
    Will the first line call the second routine, and the second line call the first routine?

    I'm feeling vicious...
    What about this:
    Code:
    Public Sub ViciousRoutine(Arg1 As String, Arg2 As Long)
        'Some code...
    End Sub
    Public Function ViciousRoutine(Arg1 As String, Arg2 As Long) As Long
        'Some OTHER code...
    End Function
    And this is my code:
    Code:
    Const VB_Do = 4
    ViciousRoutine "What will", VB_Do
    What happens here?

    [Edited by Sc0rp on 09-02-2000 at 03:59 PM]

  9. #9
    Guest
    ummm that would give a type mis-match error....

  10. #10
    Guest
    I just fixed it.

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I expect it will do one of two things:

    1. Refuse to compile
    2. Choose depending on whether you assign the return value:
    Code:
    Public Sub ViciousRoutine(Arg1 As String, Arg2 As Long)
        'Some code...
    End Sub
    Public Function ViciousRoutine(Arg1 As String, Arg2 As Long) As Long
        'Some OTHER code...
    End Function
    Public Sub Test()
        Dim x as Long
        x = ViciousRoutine("Hi", 50)
        ViciousRoutine "Different", 100
    End Sub
    In this case, when you assigned it to x, it would use the Function. When you ignored the return value, it uses the Sub instead.

    Dennis - in multithreading, you can do cool things like this:
    You have a program that (say) creates a fractal image. You want to make it simple, so you have your second thread, which draws the picture. What the main thread does, is start the second, then wait for the user to hit escape. If they do, it then stops the second thread.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  12. #12
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Procedure overlaying is what you are discussing here is one type of polimorphism.
    Two (or more) procedures with the same name but with different signatures (that is the number or types of arguments).
    The code Sc0rpe suggested is the essens; two procedures with the same names but with different arguments.
    I don't know however if one can be a Sub and the other a Function or if they have to be of the same type of procedure (for that I think we just have to wait and see how MS implements it).

    The code sample that parksie supplied can actually be done today using Property procedures.

    An other form of polymorphism (that allready exists in VB) is to call different objects in the same manner.
    You can do this today by using interface classes and the Implements keyword.

  13. #13
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    emo, you need to fix the link to alladvantage in your signature

  14. #14
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    I think the type of polymorphism discussed here is function overloading

    (God, does that sound techy or what?)
    Courgettes.

  15. #15
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Very techy . Another cool feature (AFAIK it's only in C++) - Operator Overloading. Basically, you can do stuff like this:
    Code:
    Dim A as New MyClass
    Dim B as New MyClass
    
    A = "hello"
    ' ==> A.m_Str = "hello"
    
    B = "another"
    ' ==> B.m_Str = "another"
    
    Debug.Print A + B
    ' ==> prints "hello_another"
    It lets you define custom functions for stuff like +/-/divide/multiply/equals/comparison and all the rest of it.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  16. #16
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    I know, I've just read about that on my book, and it looks really good.
    Courgettes.

  17. #17
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    What book do you have?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  18. #18
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    Learn C++ in what seems at first 21 days but you'll spend a week or two on day 8 and 9 (pointers and references)

    I'm learnin C++ until I feel confident enough to do VC++
    Courgettes.

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