devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

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.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

Checking the Free Space on a Drive

You can obtain the free space details of each drive by executing this stored procedure: Master..xp_fixeddrivesdrive MB free—– ———–C 1317D 7194E 3930(3 row(s) affected)

Exiting a Nested Loop

Sometimes, you need to exit a nested loop early, and the break; statement will only let you exit one level of a loop. Use a flag to indicate if the

Sorting a String Alpabetically

To Sort a String in alphabetical order instead of ASCII order (i.e A,a,B,b not A….Z,a….z), use the Collator class from the Java.text package.Here

Reading Properties from a File

It’s not too much trouble to read a few arguments from the command line. It really becomes a problem if you have to read 50 or more arguments. One solution

Avoid Errors on Assigning Null Values

Whenever you read a database field, concatenate an empty string to the field value before assigning it to a variable or control property. This prevents the program from giving an

Passing ByVal to ByRef Parameters

By default, VB passes all arguments to a procedure by reference, which means the procedure can change the values of the variables you pass. However, there

Center Your Logo on MDI Forms

You can display a logo in the middle of your MDI form. The logo stays in the middle even when the MDI form is resized. After creating your own MDI

Contain Tab Groupings Within a Frame

The best way to work with the tab control is to set up a different frame for each tab. If you set the frames to be indexed, you can quickly

View the Right Side of a Truncated String

You see trailing ellipses (…) when VB truncates either the expression or data portion of a data tip (the mouse-hover watch value you get while debugging). This is great if

Determining the Angle Between Two Lines

In graphical applications, you often need to know the angle between two lines. You can move their intersection point to the origin easily, so all you need to do is

Flash MX Is a Big Step Forward

acromedia just announced the sixth version of the Flash IDE and player, Flash MX, which positions Flash as the vanguard of an entirely new project strategy, called Macromedia MX. Flash

Showing and enumerating MDI child forms

An MDI child form is a regular form whose MdiParent property points to its MDI container form, so the code that creates and displays a child window is very simple:

Multi-column menus

The new Break and BarBreak properties of the MenuItem object let you create menus with multiple columns. All you have to do is set either property to True for the

Copying data into the Clipboard

Copying a piece of information into the clipboard is as easy as calling the Clipboard.SetDataObject: you can pass this method a string, an image, and so on. If you pass

Boolean Conversion

Numeric values and pointers are implicitly converted to a Boolean value in conditional expressions. For example: void *p = get_ptr();if(p){ // process p} A zero value evaluates as false. All

Using Pointers as Integers

In the early days of C, pointers were plain integers. Relics of this approach can still be found in vintage APIs and legacy code. For instance, the ANSI C header

Notes about the system() Function

The system() function (declared in ) launches another program from the current program. As opposed to what most users think, it doesn’t return the exit code of the launched process.

A Recommended Exception Handling Policy

Exceptions report abnormal runtime situations. Although you have other mechanisms for detecting and reporting runtime errors, exceptions are advantageous because they automate the process of passing the error from a

Uses of the

The volatile specifier disables various optimizations that a compiler might automatically apply and thus introduce bugs. I

Create a Touch utility

The SetCreationTime, SetLastWriteTime, and SetLastAccessTime methods of the System.IO.Directory class let you modify the date attributes of a file or directory: ‘ Change the access date- and time of all

Internationalize Your ASP.NET Applications

Ollie Cornes has been working with the Internet and the Microsoft platform since the early 90’s. His roles have included programming, technical authoring, writing, project management. He has co-written several

Accessing Data Members in a Multithreaded Application

To ensure that only a single thread accesses a data member of an object, declare that member private. Next, add the necessary synchronization operations (e.g., a call to EnterCriticalSection()) in

The std::unexpected() Function

The Standard Library defines a function called std::unexpected() which is invoked when a function throws an exception not listed in its exception specification. std::unexpected invokes a user-defined function that was

Registering a Function with std::set_unexpected

set_unexpected() takes a pointer to a user-defined function of the following type: typedef void (*handler)(); Use set_unexpected() to register a user-defined routine that will be invoked when a function throws