devxlogo

Tip Bank

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

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,

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

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

Check for NULLs Returned from DLL Calls

After a call to a DLL, the return value often contains a null.One way to eliminate the null is to look for Chr$(0), as in theexample: Dim CheckForNull As IntegerCheckForNull

Monitor Resolution Through API

There is a simple way to get Monitor resolutions through a WinAPIcall. Declare this in a module: Declare Function GetsystemMetrics Lib “User” (ByVal _ nIndex As Integer) As Integer And