November 21, 2000

OpenWindowsHelp – Bring up the Windows Help system

Private Declare Sub keybd_event Lib “user32” (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Private Const VK_LWIN = &H5BPrivate Const KEYEVENTF_KEYUP = &H2′ Open the Windows HelpSub OpenWindowsHelp() ‘ programmatically press the Windows key keybd_event VK_LWIN, 0, 0, 0 ‘ then press

Use an Adapter Class To Provide Empty Implementations For Javabean Interfaces

Like many high-level, abstract, and portable concepts, EJB spec has itsdownsides. One of them is the very generality that makes beans so portable.Interfaces javax.ejb.EntityBean and javax.ejb.SessionBean declare quite a few methods and most of them are not used by simple bean implementation. Yet developers must provide empty implementations for all

Creating Constructors

In the coming Visual Studio 7, it is possible to create constructors in VB. One of the great benefits of using constructors is that they make it possible to control the initial state of a class. This is done by setting values in the Initialize event of the class. It

Passing An Object’s Property As a Parameter

When you pass a read-writable property directly as a ByRef parameter to a function or subroutine, the property will not be changed. This is because in VB 6.0 or previous versions, the parameter will be copied to stack as specified data type, but the object is not referenced. Try the

Convert DateDiff Seconds Into a User Friendly Duration

The duration of a timed task in seconds can be determined by the DateDiff function. To present the result in a user friendly format, pass the DateDiff result to this function. Private Function ConvertSecondsToHHMMSS(lSeconds As Long) As String Dim curMinutes As Currency Dim curHours As Currency Dim sSeconds As String