It depends. Sound like a copout? Might be. But it's almost an impossible question to answer unless you have some idea where you want to go with this programming stuff. How much time are you willing to put into the learning curve? How much money are you willing to spend? How important is speed of execution for the applications you write? And will you use the language only for Visual CADD stuff, or do you eventually want to write other programs? With those questions in mind, we'll discuss some of the options. We're not trying to tell you what to do, but rather provide some information to make decisions on which way to go. Obviously, this article is written for the beginner, who has little or no programming experience and doesn't yet own programming software. If you talk with an experienced programmer, more likely than not they'll expound on the virtues of the language they're using and disagree with most of what is said here. Comes with the territory. We look forward to feedback. If folks want to comment on what is written here, we'll attach those comments to the end of this.
As discussed in What is the Visual CADD API?, many programming languages can access the Visual CADD API, but only Visual Basic, C++, and Delphi have function declarations written for them --thus the others are more suited to the experienced programmer. So we'll talk only about the three languages --in fact, we'll touch only briefly on Delphi since we have no experience with it (but some Delphi code tutorials have recently been added to the site).
The Learning Curve - Although some experienced programmers will tell you that C++ is as easy to learn as Visual Basic or Delphi, don't believe them. Certainly one could argue that if you're creating DLL's, as we are in the tutorials, without dialog boxes or other forms (we use one only in the last tutorial), the coding is essentially the same. Partly true. If you only want to do the tutorials, fine. But if you want to get a basic grasp of how programming works, you'll probably get there faster with Visual Basic or Delphi. That's because the way they work is intuitive to Windows: you start with a form (like a dialog box), then draw controls on it --OK and Cancel buttons, text boxes, dropdown lists. You next set properties for each control --is the OK button the default when you press enter? Do you want to tab between the text boxes and dropdowns? Finally, you write code, so that when you click the OK button, something happens.
The problem with C++ (we'll use Microsoft Visual C++ as an example from here on out) is that it can be TOO powerful -- it offers many choices and conceptually is not as easy to grasp. The forms are created in a separate resource editor, and writing the code is not as linear or intuitive as in the other languages. True, it will do the same thing as VB and Delphi, and once you understand the concepts, they don't seem that difficult, but it can be tough for a newcomer to even get started.
Cost - This is partly an issue of speed, which is discussed directly below. If you are buying the Professional versions of VB, C++ or Delphi, for several hundred dollars, you have all the bells and whistles you need for some pretty serious Windows programing, and can skip to the next section.
But what if you want to get your feet wet without spending a bundle? You can buy inexpensive versions of each language: Visual Basic 4 and Visual C++ 4 have a Standard edition (called "Learning" edition in the recently released versions 5 of VB and VC++) for about 100 dollars (these were the versions that our tutorial examples were written in, but the same prices hold for new versions). Delphi has a Standard edition as well for about the same price.
With VC++ and Delphi, these basic versions allow you to write and compile DLL's. The Standard versions of Visual Basic, on the other hand, don't support the OLE DLL's, so you would have to write EXE files. The disadvantage of an EXE program is that it must load and unload from memory each time you call it, and thus is slower to run.
Speed - If you're going to write fairly simple routines --the kind of stuff in the tutorials-- then speed is not an issue, and you can skip this section. But if you dream of complex tools, such as parametric generation of doors and windows, then the language you choose will have an impact.
C++ is faster. All the talk about how finicky it is, and hard to learn, is offset by this fact: it's the fastest and most powerful thing you'll find. For simple stuff, you won't notice too great an increase over VB or Delphi. But in a memory intensive app, that is used all the time, you'll see the difference. It may not matter to most. But again --if you have big plans for customizing, and can hack the longer learning curve of C++, it's the way to go.
Visual CADD or other stuff? - Let's put together what we've talked about so far. If you're only interested in writing apps for Visual CADD, and want something that will load quickly (a DLL), AND don't want to spend a lot of money, you'll likely choose VC++ or Delphi Standard versions, because the speed of the EXE with VB Standard is slower.
If you want to write other Windows programs outside of Visual CADD, then Visual Basic or Delphi will likely provide you the shortest learning curve to understanding Windows programming. VB apps in particular will allow you to customize the Microsoft line of Office products (the Visual Basic for Applications included with those programs is just a simplified version of Visual Basic). Here you might want to spend the money on the Professional version, to get the extra tools and power available for Windows programming, and also have available the OLE DLL's for your Visual CADD work.
In many ways Delphi seems the best of both worlds (I'm sure I'll hear from Delphi programmers confirming this!). It has the intuitive interface (like VB), but is a compiled language, and thus is faster than Visual Basic (although the speed gap is reportedly narrowed with version 5-6 of VB). The biggest problem with it --rightly or not-- is that not as many VCADD people use it to program as the other two. But as mentioned earlier, Delphi tutorials have just been added to this site, so we hope to have more and more on Delphi in the future.
As you can see, there are lots of options. The choice is yours. To ask questions or give your two bits, please e-mail below.