August 9, 1997

Simultaneous Debug for Server and Calling Application

VB4 not only allows you to create OLE Automation servers, butto debug the server and the calling application simultaneously.If you want to create a remote OLE server, set the Instancingproperty of the class modules to Creatable SingleUse. This willmake debugging more interesting. Each time you call that class, the calling

Retrieving Data from A Dialog Form Without Using Globals

From the days of VB3, you no doubt recall the pain of retrievinganswers from a dialog form that you displayed from another form.The use of Globals was about the only way provided. In VB4, formsare objects and you can call methods in them from another formjust as if they were

Writing Add-ins Can Be Tricky

Writing add-ins for Visual Basic 4.0 can be challenging, rewarding,and tricky. If you are not careful writing add-ins, you can causeVB to do strange things and even abort. Although I’m sure thatother diagnostics can occur, this error has appeared more thanonce for me while I was debugging add-ins. The messages

Determining If An Object Has Been Set

VB4 provides lots of new capabilities to use objects. Unfortunately,all of them require the object to be set beforehand, which isn’talways feasible. VB provides no way to see if an object has beenset. The only way of checking is to pass the object to a functionand attempt to access it.

Incorrect API Listings

APILOD16.EXE and APILOD32.EXE access the file WIN32API.TXT toallow the programmer to paste the TYPE declarations needed tocall the Win32 API. The file WIN32API.TXT incorrectly allots a LONG field to eachbit field the API requires. A misalignment in parameters results,rendering those TYPEs somewhere between dangerous and useless.This could be very difficult

Change the MousePointer to Prevent User Input

Because setting the MousePointer property for a form only changesthe shape and does not prevent the application from acceptinguser input from the mouse or keyboard, I have developed this tip.The tip works on an MDI form where there may be several open childwindows, and you need to disable one or

Speed Your Animations and Save Memory

Tired of loading icons or bitmaps or creating many images withthe several styles of pictures in form modules that blow up yourapplication and slow it down in VB3? If so, you can create several icons or bitmaps of similar style.Then create a pure text (ASCII) file like printer.txt or printer.rcthis

Avoid Update Errors In Access Databases

Avoid “Couldn’t update; currently locked by user ‘name’ onmachine ‘machine’ ” error in VB4 when two or more applicationsaccess the same MS Access database table. For the given table, a primary or any nonunique key is defined.The two applications may have opened the database table as anyone of the record-set

No more posts to show