devxlogo

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

Shortcut for 16/32-bit Development

Here is a tip that should make life simpler for all VB programmers doing mixed 16/32-bit development in VB4 under Windows 95. I have three additional items in my project

Regarding “Validating Numeric Input”

The tip you published on page 70 of the September 1996 issue of VBPJ on “Validating Numeric Input” was a good tip. However, the function failed to take into account

Table Checker

I use a housekeeping routine to check the state of tables during system initialization. The routine tests whether the table is in a collection, whether the table has data, and

Placing A Combo Box Onto A Toolbar

To put a combo box on a toolbar, create a place holder and positionthe combo box above the place holder in the z-order. You can’t place thecombo box inside the

Print a Single Sub or Function

Need a fast way to print only one sub or function in VB3 that also takes care of the problem some printers have in printing the last page?Create a small

Handling Erros In The Form_Load Routine

In VB3, the PostMessage API can cancel an error during Form_Load. Theform unloads if you send a WM_CLOSE message to the loaded window in theerror handler of the Form_Load routine.

Support The Full ImageList API In VB4

To draw a selected transparent image in VB4 from an Imagelist control,as you do in C++, follow these steps. The ImageList_ API functions have many features that weren’t passedthrough in

A Fast Way to Change Case

Do you need to convert user input to all upper case in VB3? All the ways I have seen to force user input to all upper case is to make

Quick Test for Weekend

To test whether a date falls on a weekend, you might be inclined to do this: nDay = weekday (sDate)If (nDay = 1) or (nDay = 7) Then ‘It’s a

Augmenting Error$

In many places, I include Error$ as picked up in an error trap in a descriptive message. I use a function to expand its meaning. I call the function TSS

Manage Focus with MDI Toolbars

While developing MDI applications in VB 4.0, you probably have noticed that the cursor on the MDI child disappears when you click on the toolbar on the MDI parent. You

Printing Problem with Win95

Microsoft is currently working on a printing problem. Visual Basic 3.0 applications running in Windows 95 cannot print to shared printers with an embedded space. If a shared printer has

The StartMode Property Of The App Object

The StartMode setting in the Options dialog of the Tools menu in VB4determines only whether an application with no startup form continues torun after Sub Main has completed. This allows

Use The Sleep API Function Instead Of DoEvents

When in NT or Windows 95, use the Sleep API function instead of DoEvents.DoEvents does this: while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg);} DoEvents spends part of its

Center Your Forms

Add a method in VB 4.0 to center your forms against the screen or aparent form. Create a new project with two forms. Add this code to Form2: Public Sub

Don’t Remove Controls Using Tools-References

Use the Tools-Custom Controls dialog instead of Tools-References toremove controls. The project file will show references to all custom controlsin the project’s toolbox, even if they are not used by

New Declarations Possibilities For VB4

Add Optional parameters to your procedure calls. Both Functions and subs can now use the Optional keyword in the declaration to indicate that the following parameter is optional: Function mfbCheckDBStatus(Optional

Align All Your Controls On A Form

To line up controls on a form in VB4, select all the controls you want to line up. Press F4 to bring up the properties window. Then double-click on the

Passing A Control Array

Working with control arrays in VB3 was frustrating, but with VB4 youcan pass a control array as an argument to a function. Simply specify theparameter type as Variant: Private Sub

Add Properties To Data Access Objects

How many times have you wished field objects had a “RequiredIfCondition1″or other user-defined property? You can add one easily: Set NewProperty = Field1.CreateProperty(“FieldNote”)NewProperty.Type = dbTextField1.Properties.Append NewProperty

Hard-Lock a Table

In many applications, I want to make absolutely sure that the data in a Jet table doesn’t get modified under any circumstances. I hard-lock the table in addition to using

Create Custom Properties For Forms or Class Modules

Have you ever wanted to push a variable onto a form without using atag? Property functions let you create custom properties for forms or classmodels. Use PropertySet, PropertyGet, and PropertyLet

Create “Tag Tips”

Use the Tag property and the MouseMove event to create “tag tips”which look like tool tips. Create a label to be used as the tool tipbox and set its visible

Minimizing All Windows In Win95

In Windows 95, only the VB windows with the property ShowInTaskbar setto True are minimized if you select Minimize All Windows from the taskbar context menu. This is the way