August 22, 1997

Clean and Compact Your Code

The last thing you should do before creating your final EXE is clean your code. This tip explains how to clean the garbage from your project that is sometimes left behind from moving procedures in and out of different project files. Doing so will make your project files smaller and,

Scrollable Viewport for a Picture

It’s easy to make a scrollable viewport for a picture in both VB3 VB4. In addition to a picture, you can also use other objects that grow. First, create a new form. Place a picture box on the form, name it “picParent,” and resize it. This will be the viewport.

VB 4.0 Add-In Error Messages

The ability to write add-ins under VB 4.0 is a significant addition to the developer’s toolbox. However, writing and distributing add-ins can be fraught with many a mind-boggling experience. One of these is dealing with the mysterious message, ” ‘Add-In Name’ could not be loaded. Remove it from the list

Directory References in Code Profiler

The Code Profiler does not properly handle relative directory references in the VBP file. If the file looks like this, Code Profiler aborts trying to process the CRW45 file: Module=PASSMAN1; PASSMAN.BASModule=CRW45; ..CM4CRW45.BAS Code Profiler does not understand the context of the file reference. Before running the Profiler, change all the

OLE Automation Versus Standalone Mode

There you are, creating an OLE server in Visual Basic. You go to Options in the Tools menu, select the Project tab, choose “OLE Server,” and click on OK. After compiling, you run the executable. Is it an OLE server? Unfortunately, it’s not.What makes a VB4 application an OLE server?

Substitute the Array Function for the DATA Statement

My first encounter with Visual Basic (VB1) was a letdown because I had become accustomed to using the original Basic “DATA” statement for loading numeric values. The statement was also useful for testing programs that processed sequential data streams. Unfortunately, both QBasic and Visual Basic didn’t/don’t support it. I must

Protect Your Screen Saver From Restarting

When you create a screen saver in Visual Basic, you may sometimes utilize the command-line options such as “/s” to start a screen saver directly or “/c” to run the configuration. By simply using App.PrevInstance, your application may not detect the running screen saver and attempt to start another when

Track Modem Use by Other Applications

With applications increasingly using modems, it is quite possible that users will start your application, forgetting that another application is already using the modem-like a fax machine, for example.The MS Comm object that comes with VB has a PortOpen property that returns the state of the modem. However, this property

Branding a Jet MDB File

This routine allows a hidden table to be appended to the Tables collection in an MDB file. I use the table name as a brand or stamp. During development, I change the brand when design changes are made to the MDB file. Access tables with Msys and Usys preambles are

No more posts to show