|
41-60 of 228
Previous
Next |
|
Generate GUIDs With One API Call
by Dj Hackney
|
|
Use GetInputState in Loops
by Daniel R.
Some developers suggest putting DoEvents in loops to keep your application responsive. This is never a good idea. If the loop is short, you don
|
|
Use Faster Floating-Point Division
by Jason Bock
If you do a lot of floating-point division operations in VB, you can optimize these operations by multiplying by the reciprocal value. For example, instead of performing this ...
|
|
Use a Class Module for Persistent Global Variables
by John Zenkavich
When I use variables that need to be saved to the Registry or to an INI file, I sometimes forget to place the API call after the variables in a program have changed. This might cause problems later ...
|
|
Fill In the E-Mail Fields
by Robert Smith
ShellExecute is one of the most flexible Win32 APIs. Using ShellExecute, you can pass any filename, and if the file
|
|
Let Users Resize Your Controls
by Fran Pregernik
You can allow users to resize a controljust like in VB design modewith a mouse, using two simple API calls. You can resize the controltop-left, top, top-right, left, right, ...
|
|
Retrieving Browseforfolder() Files
by DevX Pro
I'm using a function named Browseforfolders() that uses the following code:
Private Declare Function SHBrowseForFolder Lib "shell32.dll" _
Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
and the declaration of this constant:
Private Const BIF_RETURNONLYFSDIRS = &H1
What I would like to know is, if using this function, is it also possible to obtain the files from the directory?
Best regards,
Bruno
bruno@escripovoa.pt
Visual Basic Software developer
|
|
Swap Strings Faster
by Thomas Weiss
Here's a cool way to swap ...
|
|
Remove Unwanted System Menu Options
by Earl Damron
You've probably wanted to limit the normal operations of a form, such as resizing it, preventing it from being minimized or maximized, or allowing it to be closed only when you say so. The trick is ...
|
|
Translate Ole_Color to Actual RGB Value
by Ben Baird
Have you ever tried to pass a VB system color constant-such as vbButtonFace-to an API call that asks for a color? I frequently need to use system colors for GDI calls, and prefer to use the VB system ...
|
|
Load Tree Subnodes on Demand
by Ben Baird
Here's a quick way to drop a drive's folder hierarchy into a TreeView control. The advantage to using this method is that folders are enumerated only when a node is expanded, so your app won't waste ...
|
|
Generate Unique String IDs
by Edward Lennox
If you need unique string IDs and don't have a sure-fire way of either generating or guaranteeing the generated ID is unique, then you need a Universally Unique ID (UUID) or Globally Unique ID (GUID) ...
|
|
Extract null-delimited strings
by Francesco Balena
Most API function that return a string require that you pass a buffer where they can place the result as a null-terminated ANSI string (a.k.a. ASCIIZ string). The calling code must then extract the string by taking all the characters up to the first Chr$(0) character, if there is one. For ...
|
|
Leverage Office to Spellcheck RichText
by Rohit Kapoor
Integrate Microsoft Word 97's spellchecking capability into VB apps while maintaining formatting within a rich textbox. To test this ...
|
|
Generic Listbox Columns Routine
by Jim Farrell
Use the SendMessage API to set tab stops in a VB listbox by creating these declarations and this routine in a ...
|
|
Locate the Temp Folder
by Robert Smith
In your apps, do the right thing: Use the computer's Temp folder to hold your temporary files. To find that location, paste this code into the Declarations section of a ...
|
|
Retrieve Localization Strings
by Brian Morris
Use this API function wrapper to retrieve localization and personalization ...
|
|
Align Text on a Command Button
by Sam Huggill
If you've ever wanted to align text on a command button and found you can do it only by using spaces in the caption, there are a couple of constants that can help you do this with the SetWindowLong ...
|
|
Avoid the Cost of Repeatedly Copying a Temporary Object
by Danny Kalev
Consider the following code ...
|
|
MCI Supports Multiple CD-ROMs
by Matt Hart
The Media Control Interface (MCI) can easily support multiple CD audio devices.
|
|
41-60 of 228
Previous
Next |