
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
This is one of the simplest, but most powerful, ways to make a form scrollable. This method automatically disables or enables scrollbars according to the size of the area in
Many programmers use Visual Basic’s Clipboard object to perform Cutting, Copying, Pasting and Undoing code. For example, to copy some text from a textbox, programmers sometimes use the following code:
Sometimes there is a need to group records into two larger categories, regardless of all other groupings. Using the Northwind database for an example, let
‘——————————————————-‘ The CTREEVIEWEDIT Class module” This class lets you use a regular TextBox control to’ edit a treeview node’s label. All you have to do to’ use this class is
Often, properties and methods associated with grid controls don’t provide an absolute (relative to the actual first row and not the first displayed row) row index of current or selected
By using resource file, strings used by controls or message windows can be converted to different language strings in your application. The VB 6 Resource Editor allows the addition of
During the preprocessing phase, you can report errors by using the #error preprocessor directive. For example, suppose you have a program that uses 64-bit integers. This program has to be
Although the library was deprecated for several years, many C++ users still use it in new code instead of using the newer, standard compliant library. What are the differences between
To generate random floating numbers, choose a floating point number, divide it by the largest value of int type and multiply the result by the value of a function that
C++ requires that the size of an array be a constant integral expression. However, the following code refuses to compile: // in const.hextern const int ID_LENGTH; // declaration// in const.cppconst
You can override the default number of digits after the decimal point by calling the precision() member function of an ostream object. The following program first displays six digits after
To create an iterator of a vector, you have to use a vector specialization. In the following examples, I create two vector iterators: one for the specialization vector and another
By default, cout displays integral values as decimal numbers. You can override this setting and have integral values displayed in hexadecimal and octal notations by using the ‘hex’ and ‘oct’
In C++, pointers are strongly-typed. Therefore, you can’t assign a void pointer to any other pointer type without casting it explicitly: int n;void *p = &n;int *pi=static_cast< int* >(p);//C++ requires
C++ guarantees that operator delete checks its argument for null-ness. If the argument is 0, the delete expression has no effect. In other words, deleting a null pointer is a
By default, iostream objects are set to display floating point values in fixed notation. To change this, you apply the ‘scientific’ manipulator to an output stream object: #include using namespace
You can determine the line where the caret is in a multiline TextBox control by sending the control a EM_LINEFROMCHAR message, as follows: Private Declare Function SendMessage Lib “user32” Alias
f you have been following this series of articles, you know the problems with date data entry and the proposed a pop-up calendar solution that allows a user to pick
n a previous 10-Minute Solution, “New PL/SQL Features in Oracle 8i: Part I,” I write that Oracle PL/SQL programmers develop complex code nowadays, utilizing custom and Oracle-supplied packages. It therefore
ith all the hype that servlets, JSPs, EJBs, and distributed J2EE applications have received, the art of creating a basic interactive command line Java application has been lost. Although fancy
ne of the inherent difficulties in backup and contingency planning is that it usually takes only one thing to go wrong to bring down your entire system. To be truly
ith more and more companies moving their applications to the Internet, Visual Basic developers are faced with the problem of having to build components that scale to thousands of users.
n my previous “Best Defense” article, I discussed creating secure Win32 applications. Now I turn my attention to another important battlegroundthe Web, where data input attacks are a real danger.
agging an XML document is, in many ways, similar to tagging an HTML document. Here are some of the most important guidelines to follow.Rule #1: Remember the XML declarationThis declaration
hese days almost every application requires some sort of data persistence, whether local, remote, or both. Developers traditionally have built applications with a specific data store and source in mind,
You can’t clear the contents of a MaskEdBox control by setting the Text property to a null string if the MaskEdBox’s Mask property contains delimiter. In fact, you must include
At times you may want to temporarily hide the mouse cursor, for example in order to reduce flickering. To do so you just need the ShowCursor API function: Private Declare
If a form contains one CommandButton control whose Default property is set to True, the Enter key activates the CommandButton. If the form doesn’t contain any default CommandButton control, however,
Visual Basic doesn’t let you change the Style property of a CheckBox or an OptionButton control at runtime. However, you can easily do it by manipulating the control’s style bit,
When you disable a control, VB grays its contents. However, often this action goes unnoticed by the end users. Here’s a routine that changes the control’s BackColor property in addition











