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

Allow Interval Greater Than Timer Controls

When you need a timer for a larger interval than the Timer control allows, insert this code into a BAS module. The procedure starts when the timer interval has passed:

Bind Option Buttons to Data Controls

The Option button is a convenient way to display multiple options from which only one can be selected. One problem is that the Option button cannot be bound to a

Format Your Version Info

Many professional applications are required to display a version number on all screens to indicate to users which version of the app is currently running. This also helps with configuration

LoadTextFile – Load the contents of a text file

‘ Returns the content of the specified text file’ Note: it can throw an exception’ Usage: Dim FileContent As String = LoadTextFile(“C:Autoexec.bat”)Function LoadTextFile(ByVal FilePath As String) As String Dim sr

CopyDirectory – Copy a directory

‘ Copies a source directory to the destination directory.’ The last parameter specifies whether the files already present in the’ destination directory will be overwritten’ – Note: requires Imports System.IO’

GetDirectorySize – Calculate the size of a directory

‘ Returns the size of the specified directory’ – Note: requires Imports System.IO’ – Usage: Dim DirSize As Long = GetDirectorySize(“D:Projects”)Function GetDirectorySize(ByVal DirPath As String) As Long Dim DirSize As

Define Your Own Functions in SQL Server 2000

hose of you who program in Visual Basic, C, or other languages are probably used to writing your own functions. As a SQL programmer, you know how frustrating it’s been

10 Reasons to Dump Your Java IDE

t the opening of this year, while the rest of the world was swearing off high-fat foods and cigarettes, I was making a far different kind of New Year’s resolution.

Create Adaptable Dialog Boxes in MFC

hen working with the Microsoft Foundation Class Library (MFC), I occasionally need dialog boxes that look and act similarly but have small differences?dialog boxes that do different things with the

Avoid Copying Data

You can use the name of a Function or Property Get procedure as a local variable anywhere in the procedure. If your procedure returns a String or UDT type, writing

Determine a Control

To determine whether a control is a member of a control array, you can reference its Index property and handle the generated error when the control is not in an

Ascertain OK or Cancel From the InputBox

When the user presses Cancel on a VB InputBox, the string returned is a vbNullString. If the user inputs a zero-length string and presses OK, the return string is empty

Force Tri-State Checkbox Cycling

The CheckBox control in VB supports three positions: Checked, Unchecked, and Grayed. Unfortunately, the default behavior for the control is to cycle between Checked and Unchecked. To set it to

Avoid Premature Object Creation

This is a simple tip that proves useful in the long run. Consider the following example: void someFunction() {Date d= new Date(); // The Date object is created outside the

Handling Single Quotes in a SQL Query

To insert data with single quotes, place 2 single quotes instead of 1 single quote, like this: create table MyTable ( Field1 varchar(10))goinsert MyTable (Field1) select ‘A1111”1111’ UNION ALL select

Insert Multi-Lingual Characters in JDBC

This method allows you to insert multi-lingual characters into an Oracle database. In this tip, the column type is varchar2. The multi-lingual string is converted to its unicode value and

Make a ResultSet Scrollable

This code can also be used to navigate through the Resultset backward or forward, or to perform insertions, deletions and updates to update the database. //load JDBC Driver// Get the

Adding Left and Right Functionality in JavaScript

JavaScript does not offer Left and Right functions. Use the following functions to extract the left or the right part of a string. function Left(str, n){ if (n String(str).length) return

The Use of the “this” Pointer in JavaScript

This tip explains how to pass an object to a JavaScript function and retrieve the values from the “this” object. See the following piece of code: click… Run the above

ASP.NET 1st Guestbook

This guestbook shows how to use some features of ASP.NET, such as data-binding, database programming, Web Forms security, caching and the Web.Config settings. You’ll also see in action the DataGrid

FormatSize – Format a size expressed in bytes

‘ Returns a formatted string that shows the size in Bytes, KBytes or MBytes’ according to the size’ Usage:’ Dim ProperSizeString As String = FormatSize(“132100842”)’ -> returns “125.98 MB”Function FormatSize(ByVal