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

DevX - Software Development Resource

Second Editable Code Window In VB

Look for a thin horizontal line at the top of the client area in theVB code window that comes up when you view code for a form or a module.If

DevX - Software Development Resource

Return Values Not Required!

You do not have to use the return value of any function! Thisnew behavior is in the manual (under CALL), but is a shocker,and a little dangerous: Private Sub Form_Load()

DevX - Software Development Resource

Making Use of Shortcut Keys

“Send a Message” (Windows Programming, by Jonathan Zuck,VBPJ December 1995), a great example of code usable ina text editor, mentions three ways to code the Clipboard functionsusing SendMessage, VB’s Clipboard

DevX - Software Development Resource

Hide the Record Selector in Data-Bound Grid

To stop the selection bar on a data-bound grid from moving when navigating through records in the boundRDC or the rows on the grid, use the API call LockWindowUpdate(gridname.hwnd) before

DevX - Software Development Resource

List Box Cumulative Search

By default, VB list boxes use any keyboard input to find the firstitem beginning with the pressed letter. Where the number of itemsin a list box is large (>100), this

DevX - Software Development Resource

Scream Through Searches With Byte Arrays

This subroutine shows how byte arrays can speed a search though a file.The routine is called with the file name, a string to look for, a flagthat tells it to

DevX - Software Development Resource

SS3D2.VBX And Win95 GPF

Running applications written in VB3 in the WIN95 OS is not always aclean conversion. This code would work fine in Windows for Workgroups 3.11,but would GPF in WIN95. SS3D2.VBX, which

DevX - Software Development Resource

Reduce Flickering During Form Loading

When loading a form, reduce the “flicker” and “flash” of the GUI by using these Windows API functions: ‘Declarations Section#If Win32 Then Declare Function LockWindowUpdate _ Lib “user32” _ (ByVal

DevX - Software Development Resource

Parsing a Variable Number of Arguments

Optional parameters are a great new feature in VB4, but the ParamArraykeyword is an overlooked addition to function and subroutine declarations.The ParamArray keyword allows an unspecified number of Variantparameters to

DevX - Software Development Resource

Programmatically Close Another Program

To have a program programmatically close another program, use this code: ‘ Close an existing program Title = “VBApp” ihWnd = FindWindow(0&, Title) ihTask = GetWindowTask(ihWnd) iRet = PostAppMessage(ihTask, WM_QUIT,

DevX - Software Development Resource

Elastic Fonts

Designing monitor resolution-independent applications is a frequentproblem Visual Basic programmers face. The simplest solution isto design forms at the 640 by 480 resolution found in most lap-topcomputers. Such a form

DevX - Software Development Resource

How to Calculate the X, Y of any Position on a Circle

The DegreesToXYsubroutine, part of CodeBank’s standard procedurelibrary, calculates the X (horizontal) and Y (vertical) coordinatesof any point, measured in degrees, on the circumference of a circleor ellipse. As you can

DevX - Software Development Resource

Does an Object Have a Value?

You cannot use the IsEmpty function to determine if a variableof type Form or any Object has been assigned a value. You can,however, use this method to determine if the

DevX - Software Development Resource

Close VB Before Compiling

When you’re finished tinkering with your apps, close and restart VBbefore making the final EXE. This simple action can reduce the size ofyour EXE by 10 to 30 percent (many

DevX - Software Development Resource

Load a VB4 Form in VB3

You cannot load a VB4 form in VB3 directly. You must modify theform definition. When you open a VB4 form, the file will resemblethe example: VERSION 4.00Begin VB.Form Form1 Caption

DevX - Software Development Resource

Converting Identifiers into Labels and Column Headings

Programmers are in the habit of creating meaningful identifiersby concatenating the words of a “title case” phrasethat describes the identifier, such as LastName or FinalPaymentDate.Often, you can use these names

DevX - Software Development Resource

Create A Controlled DoEvents

I needed a way to issue a DoEvents to allow Windows time to redraw controlson a form, but wanted to prevent the user from clicking some other controlwithin my application.

DevX - Software Development Resource

Selecting The Text When Entering A Field

In many cases, it is best to select or highlight the full text of afield when that field gains the focus. This allows the user to simply begintyping to replace

DevX - Software Development Resource

Correctly Convert SQL Server Floats By Jet

When using the SQL Server ODBC driver and SQL Server, and If ODBC preparedexecution is used, certain floating-point values may be incorrectly converted.Microsoft Access and Microsoft Visual Basic commonly use

DevX - Software Development Resource

File Exists?

One way to test whether a specific file exists is to open thefile for input and check VB’s error flag. An error will occurif the file does not exist. Use

DevX - Software Development Resource

Lost Long File Names?

Never, never, never assume that a given API call or control/OCXworks the same under Win95 and Windows NT. For example, the 32-bitfile common dialog handles long file names, right? Well,

DevX - Software Development Resource

Successfully Close ODBC Connections

The Microsoft Access engine will maintain a persistent connection onan ODBC connection in order to be more efficient, even after using a Closemethod on a database opened with ODBC. The

DevX - Software Development Resource

VB Shortcuts with Windows 95

With the release of VB4 and the new development environment for32-bit operating systems, I use three versions of Visual Basicin developing VB applications. Some of my clients won’t acceptapps built

DevX - Software Development Resource

New Registry Functions

There is a list of our new functions in Visual Basic 4.0 for workingwith an application’s Windows registry entries (or .INI file on16-bit Windows platforms): GetSetting(appname, section, key[, default]) GetAllSettings(appname,

DevX - Software Development Resource

Print A Single Sub Or Function

The problem? You want to print a single sub but VB always prints allthe subs that are in the current form. You could copy it to the clipboardand print it

DevX - Software Development Resource

Give Focus To Another 16-Bit Application In NT

Note that in writing in VB3.0, Visual Basic’s AppActivate statementfails to make a 32-bit application the active window under Windows NT.For example: Sub Form_Load () AppActivate “Notepad – (Untitled)”End Sub