Advertisement

Results for "Author: vb pro"

6_2008-2009 #194741
Passing a control array

Working with control arrays in VB3 was frustrating, but with VB4 you can pass a control array as an argument to a function. Simply specify the parameter type as Variant:

6_2008-2009 #194742
Dragging a form by a control

This code is reusable and small enough to paste into whatever you're doing and instantly have a form that has no need for a title bar.

6_2008-2009 #194743
Converting long file names

VB4's commands for dealing with file names (such as KILL, MKDIR, and FILECOPY) support long file names without programmer interaction. A number of the Win95 API functions will return only the short name, and you'll notice a number of short file name entries if you're digging through the registration database. Therefore, occasionally you'll need to convert a short file name into a long file name. This function lets you pass a long file name with no ill effects. The file must exist for the conversion to succeed. Because this routine uses Dir$ and "walks" the path name to do its work, it will not impress you with its speed:

6_2008-2009 #194744
Cool screen wipes

You can achieve some cool form wipes with judicious use of the Move method. For example, to draw a curtain from right to left use this routine. It is also possible to wipe a form from bottom to top, and from both sides to the middle, using similar routines

6_2008-2009 #194745
Determine when an app launches with SHELL is done

In VB3, you call GetModuleUsage() to determine when an app you started with the Shell command was complete. However, this call does not work correctly in the 32-bit arena of Windows NT and Windows 95. To overcome this obstacle, use a routine in both 16- and 32- bit environments that will tell you when a program has finished, even if it does not create a window. The IsInst() routine uses the TaskFirst and TaskNext functions defined in the TOOLHELP.DLL to see if the instance handle returned by the Shell function is still valid. When IsInst() returns False, the command has finished.

7_2009-2012 #217259
Passing a control array

Working with control arrays in VB3 was frustrating, but with VB4 you can pass a control array as an argument to a function. Simply specify the parameter type as Variant:

7_2009-2012 #217260
Dragging a form by a control

This code is reusable and small enough to paste into whatever you're doing and instantly have a form that has no need for a title bar.

7_2009-2012 #217261
Converting long file names

VB4's commands for dealing with file names (such as KILL, MKDIR, and FILECOPY) support long file names without programmer interaction. A number of the Win95 API functions will return only the short name, and you'll notice a number of short file name entries if you're digging through the registration database. Therefore, occasionally you'll need to convert a short file name into a long file name. This function lets you pass a long file name with no ill effects. The file must exist for the conversion to succeed. Because this routine uses Dir$ and "walks" the path name to do its work, it will not impress you with its speed:

7_2009-2012 #217262
Cool screen wipes

You can achieve some cool form wipes with judicious use of the Move method. For example, to draw a curtain from right to left use this routine. It is also possible to wipe a form from bottom to top, and from both sides to the middle, using similar routines

7_2009-2012 #217263
Determine when an app launches with SHELL is done

In VB3, you call GetModuleUsage() to determine when an app you started with the Shell command was complete. However, this call does not work correctly in the 32-bit arena of Windows NT and Windows 95. To overcome this obstacle, use a routine in both 16- and 32- bit environments that will tell you when a program has finished, even if it does not create a window. The IsInst() routine uses the TaskFirst and TaskNext functions defined in the TOOLHELP.DLL to see if the instance handle returned by the Shell function is still valid. When IsInst() returns False, the command has finished.

Languages
Top Categories
Global Discovery