|
-
Sep 1st, 2000, 08:11 PM
#1
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)
-
Sep 1st, 2000, 09:51 PM
#2
Conquistador
shouldn't this be posted in the chit chat section?
-
Sep 1st, 2000, 11:19 PM
#3
Hyperactive Member
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²™¤»
-
Sep 2nd, 2000, 06:17 AM
#4
Fanatic Member
Encapsulation, Inheritance, Polymorphism, Threading.
-
Sep 2nd, 2000, 06:49 AM
#5
-
Sep 2nd, 2000, 07:25 AM
#6
Fanatic Member
The ability for a class to inherit from more than one other class.
I think.
-
Sep 2nd, 2000, 01:23 PM
#7
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]
-
Sep 2nd, 2000, 02:26 PM
#8
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]
-
Sep 2nd, 2000, 02:51 PM
#9
ummm that would give a type mis-match error....
-
Sep 2nd, 2000, 03:00 PM
#10
I just fixed it.
-
Sep 2nd, 2000, 04:41 PM
#11
Monday Morning Lunatic
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
-
Sep 2nd, 2000, 09:39 PM
#12
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.
-
Sep 4th, 2000, 05:53 AM
#13
Conquistador
emo, you need to fix the link to alladvantage in your signature
-
Sep 4th, 2000, 07:17 AM
#14
Fanatic Member
I think the type of polymorphism discussed here is function overloading
(God, does that sound techy or what?)
-
Sep 4th, 2000, 01:17 PM
#15
Monday Morning Lunatic
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
-
Sep 4th, 2000, 01:59 PM
#16
Fanatic Member
I know, I've just read about that on my book, and it looks really good.
-
Sep 4th, 2000, 02:02 PM
#17
Monday Morning Lunatic
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
-
Sep 5th, 2000, 03:47 AM
#18
Fanatic Member
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++
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|