devxlogo

Tip Bank

Unload All Forms

Public Sub UnloadAll()Dim f As Integerf = Forms.CountDo While f > 0 Unload Forms(f – 1) ‘ If form isn’t unloaded exit (User had canceled…) If f = Forms.Count Then

A Replacement For Tabs

You say you want to use a tab control, but you have so many topics thetabs will be unreadable? Try using a list box in conjunction with a controlarray of

Jump To A Function Within Your Project

When you are looking at code that calls a function or procedure andyou are not sure in which module the function or procedure is defined,you can highlight/procedure name and press

Dragging A Form By A Control

This code is reusable and small enough to paste into whatever you’redoing and instantly have a form that has no need for a title bar. In thegeneral declarations section, insert

Printer Object Quirk

You would think that the following code would change the current fontof the default printer, but it doesn’t under VB4: Printer.FontName = “Arial”Printer.FontSize = 11Printer.Print “This is a test.” An

Using Components

Creating a new project with a lot of old components? In VB 4.0 you candrag and drop files into the project window to add them to the project.Use File Manager

Fix For Data Control Error 3426

This code, which works fine under VB3, may generate runtime error 3426–“Theaction was canceled by an associated object”–in the 16-bit versionof VB4: Private Sub cmdUpdate_Click() ‘ Save contents of bound

Error in DBGrid

The documentation for the DBGrid in VB4’s Professional and EnterpriseEditions states that the control’s Text and Value properties allow youto read or set the contents of a cell. This would

Programmatically Close The Binder Object

Because of customer complaints and confusion, Microsoft Office applicationswill begin to implement this strategy for programmatically closing Officeapplications. First, hide the object by setting Object.Visible to false.Then let the object