|
|
|
|
ListFiles - List all the files in a directory or directory tree
|
Total Hit (1621) |
«Code LangId=1»
' list all the files in a directory
' if NESTEDDIRS = True it lists a whole directory tree
'
' returns a 1-based array containing all the listed files
Function ListFiles(ByVal Path As String, Optional ByVal NestedDirs As Boolean) _
As String()
Dim fso As New Scripti
....Read More |
Rating
|
|
|
IsValidEmail - Validate an email address
|
Total Hit (2833) |
«Code LangId=1»' Validates an email address
' Returns True if valid, False if invalid
'
' Example:
' If IsValidEmail(Value:="x@y.com", MaxLength:=255, IsRequired:=True) then ...
Function IsValidEmail(ByRef Value As String, Optional ByVal MaxLength As Long = _
255, Optional ByVal IsRequi
....Read More |
Rating
|
|
|
Put buffering and Response.Flush to good use
|
Total Hit (2367) |
IIS5 enables buffering by default, therefore all the output from your ASP is actually sent to the browser only when the page completes its processing. In many cases this approach improves the overall processing speed, and indirectly makes for a more scalable site. However, buffering has two minor de
....Read More |
Rating
|
|
|
Open Windows's Start menu
|
Total Hit (2042) |
By simulating the pressing of the "Windows" menu - or better yet, of the Ctrl-Escape key combination, which also works on older keyboards - you can programmatically bring up the Start menu. You can't use the SendKeys function to do so, though, and you have to resort to the keybd_event API function:
....Read More |
Rating
|
|
|
Retrieve the size of an AVI movie
|
Total Hit (3860) |
To retrieve the original size of an AVI file that you've already opened with the mciSendString API function you can use this command
«Code LangId=1»
Dim RetString As String
RetString = Space$(256)
CommandString = "where AVIFile destination"
RetVal = mciSendString(CommandString, RetString, Len
....Read More |
Rating
|
|
|
Clear a MaskEditBox control without raising error
|
Total Hit (3027) |
You can't clear the contents of a MaskEdBox control by setting the Text property to a null string if the MaskEdBox's Mask property contains delimiter. In fact, you must include those separators in the value you assign to the Text property, otherwise you get Error 380 - Invalid property value.
A s
....Read More |
Rating
|
|
|
Fast Copy of Properties between Controls
|
Total Hit (2349) |
You probably already know that if you select multiple controls on a form you can use the Property Window to change one of their common property in one single operation. However, here is a trick that is likely to be ignored by most programmer (included me, until recently).
If you want to copy a n
....Read More |
Rating
|
|
|
How to test CDO email using VB Script.
|
Total Hit (3461) |
Sometimes we need to check CDO on the server with minimum amount of time.
Following script will send an email using CDO object library. If you dont have CDO then it will throw an error.
- Create an empty file in notepad.
- Copy/Paste the following script
- Save file as CDOMailTest.vbs
- Do
....Read More |
Rating
|
|
|
Using LineDDA api to control each point of line.
|
Total Hit (3245) |
This small code snippet will show you the use of LineDDA api which is very useful when you want to control each point of line. LineDDA use a callback method which gives x and y cordinates of the point to be drawn.
«b»Step-By-Step Example«/b»
- Create a standard exe project
- Add one module t
....Read More |
Rating
|
|
|
Drawing Chord using API
|
Total Hit (2457) |
«b»About Chords«/b»
A chord is a region bounded by the intersection of an ellipse and a line segment called a secant. The following illustration shows a chord drawn by using the Chord function.
When calling Chord, an application supplies the coordinates of the upper-left and lower-right corne
....Read More |
Rating
|
|
|
|
Streaming .WAV File Player
|
Total Hit (2133) |
Playing digital audio can be achieved at a number of different levels under windows. At the simplest level, there is the Multimedia Control Interface (MCI) control provided with VB. This is turn is a very thin wrapper around the MCI API provided with Win32, which offers about the same level of contr
....Read More |
Rating
|
|
|
Button ListBar Control
|
Total Hit (1352) |
The Button ListBar control provides an emulation of the ListBar provided in the Windows Add/Remove Programs window. Under XP it uses the UxTheme API to draw parts of the toolbar, and degrades to use standard GDI drawing calls when used on earlier OS versions.
....Read More |
Rating
|
|
|
Moving Forms and Creating Resize Gripper Boxes
|
Total Hit (1742) |
This article provides code demonstrating how to modify the behaviour of a VB form so that parts of it behave like title bars and resize borders. You can use this code to:
Create windows without a title bar that you can click on anywhere to move around.
Build fake title bars.
Add a Resize Grippe
....Read More |
Rating
|
|