Quote from timmyz:
sam123, whoa that looks easy! thanks.
while i have your attention, do you mind explaining in plain english what "property get" and "enumerations" do for you? why not just use simple variables and constants?
You certainly can use variables and constants, but enumerations offer the programmer a nice way to organize related constants into an enumeration type. For example:
Code:
Public Enum PriceTypes
Bid
Ask
Trade
End Enum
Then, in a subroutine, you can do this:
Code:
Private Sub ProcessMyPriceValues(SymbolName as String, Price as Double, PriceType as PriceTypes)
.
.
.
End Sub
âProperty Getâ is just a function that returns a value. It has more meaning in VB.NET, but in VB6 you can do the same thing using standard functions.
Quote from timmyz:
i have tried googling but the explanations seem to always be kind of theoretical and wordy, so i don't understand when you would need to use them. the sample code from ib uses them.
When you are on your own writing a short program, you will find there are a lot of things that can be done differently, and you would naturally accomplish your goals by writing code in the way you know how to write it. Using Enumerations is considered to be "good programming practice," yet you can certainly accomplish your goals without using them. However, as your applications get to be large and complex, and if you are collaborating with other programmers on a large project, you'll understand why IB writes the code the way it does.
Quote from timmyz:
lastly, i'm sure you can tell by now that i've taught myself some vb6, but still have lots to learn. as far as i can tell, there is still a huge community of vb6 developers out there and they bitch about vb.net. are there any clear advantages of using vb.net or anything you can't do with vb6 that you can do with vb.net? i'm not talking about saving .0000000000000002 milliseconds or something trivial like that.
You really need to stop what you are doing and get a copy of Visual Studio.NET. I can't emphasize this more, especially now while you are in the early stages of learning VB6. Rather than getting into all the advantages and few disadvantages, you need to realize that the Industry is moving to VB.NET, so you need to do the same, especially when you will be dependent on components provided by someone else, like IB.
The reason why vb6 developers hate vb.net is because they put in blood sweat and tears developing their pet vb6 projects. Then, VB.NET comes along as the logical upgrade to VB6, and they discover they have to almost completely re-develop their projects, which is no easy task. Itâs bad enough being threatened by the fact that the industry has been moving to vb.net, let alone being forced to unlearn old vb6 coding habits.
There are two products out there: Visual Basic.NET Standard, and Visual Studio.NET. Visual Studio is ideal, but expensive, unless you can get the student rate. Visual Studio allows you to create a project with components written in Visual Basic, C++, and Java, and you can create DLLâs.