Visual Basic or Visual C++
Question: I am interested in buying a new compiler and don’t know wether to purchase Visual Basic or Visual C++. I have taken a course in C++, but I am
Question: I am interested in buying a new compiler and don’t know wether to purchase Visual Basic or Visual C++. I have taken a course in C++, but I am
Question: Deleting all files in a directory should bea basic function; however, I can’t seem tofind a function that will do this. Can you point me to a function that
When network testing, it is useful to have a client program connects to a UDP server and gets an echo of a text string that you send to the server:
When network testing, it is useful to have a client program that connects to a TCP/IP server and gets an echo of a text string that you send to the
The following program is a simple version of a TCP/IP server that responds to requests from a client and delivers files. I wrote it to be as small as possible
With Java, you can easily write a client program that connects to a Web server and downloads an HTML file. You can also easily expand this simple program into a
With Java, it’s easy to write a client program that connects to a TCP/IP server to get the date and time. This is very useful for network testing. Insert your
My code often has a lot of nested procedure calls, which can be painful to trace while doing walk-throughs. Developers might be unaware of the “Procedure Definition” (Shift+F2) feature, which
This routine parses a string and returns an equivalent string where all the instances of a given substring are doubled. This is especially useful for doubling quotes within SQL statements
To use a picture on a CommandButton, you must set its Picture property and set its Style to 1 – Graphical. Otherwise, the picture will be ignored. Related Posts test
Visual Basic includes constants, such as vbActiveTitleBar and vbButtonFace, for Windows system colors, which the user might change through the Control Panel. (In VB3, these constants are defined in the
Since a class is a namespace, the scope for overloading a member function is confined to the class containing this function. Sometimes, it is necessary to overload the same function
To change the ToolTips background color, open the Control Panel’s Display tool. Click on the Appearance tab. In the Item combo box, select ToolTip. Click on the little color box
In large-scale projects different teams use API functions developed by another team or a third-party vendor. For example: int retrievePerson (int key, Person& recordToBefilled); // original version; used by all
C++ allows you to declare variables wherever you need them, thus enabling immediate initializations. A good example is a loop counter. It can (and should) be declared inside a for-statement:
Not every function that is declared inline can actually be inlined by the compiler. A function that has local variables, loops, or an extensive amount of code cannot be inlined
Conceptually, compilers synthesize a default constructor for every class or struct, unless a constructor was already defined by the user. However, in certain conditions (a simple data struct, for example),
It’s possible to create mailto links that include a subject line in addition to just the recipient’s e-mail address, however, not all e-mail programs support this functionality. That said, to
A garbage collector is handy, since it eliminates a big source for bugs, runtime crashes and memory leaks. However, garbage collection is not for free; it incurs additional runtime overhead
Polymorphism is the ability of different objects to react in an individual manner to the same message. This notion was imported from natural languages. For example, the verb “to close”
Question: Is it possible to rename a login? Answer: Sorry, no. You must drop the login and then create a new one with the corrected name. Related Posts Global Pact
Question: My database and log keep filling up and I can’t truncate the log. Any suggestions? Answer: There are two methods to empty the transaction log. One can regularly dump
According to the C++ Standard, you are still allowed to apply operator ++ to a variable of type bool for backward compatibility with old code. However, this practice is deprecated
Some users consider the addition of namespaces to C++ as superfluous or even harmful. In order to understand why namespaces were added to the language, imagine that the file system
You can provide Print Preview at different scales. First, make your printing routine take on the object it should draw as a parameter. Then, for printing, pass the routine the
This method is handy when the user enters data that you need to validate against a lookup table. Validating the value by querying the database is out of the question
Suppose you have a database field that returns a date in the Short Date format. Neither a numeric sort nor a string sort would order this column correctly. To sort
The tip “Color Status Indicator” [“101 Tech Tips for VB Developers,” Supplement to the February 1997 issue of VBPJ, page 26] got me thinking that it would look even more
When developing relational database applications, you often need to use list boxes or combo boxes to store records with alphanumeric keys. You can load numeric keys into the ItemData array
To add user-defined properties to controls, use this code to store them in the control’s tag. You can define multiple additional properties at design or run time. You can easily