TotalUtility v1.0


Author: Robert Veanbles

Lines of code: 312

Requirements: VB5 Runtime Files

1 ) General Information

2 ) Methods -The included custom built methods

3 ) Events -The included custom built events

4 ) Properties -The included custom built properties

5 ) License / Disclaimer

1) General Information

TotalUtility was designed to simplify tedious or advanced programming tasks in Visual Basic. It currently contains a total of 20 custom methods, 3 custom events, and 3
custom properties.



2) Methods

FCxAlignDeskIcons (No Arguments)
Action: Function will auto align all desktop items.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxAlignDeskIcons
End Sub

============================================================

FCxAltMove (FormName)
Action: Function will replicate title bar form movement.
Function works best when you place the code inside a MouseDown event.
Example:

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
TotalUtil1.FCxAltMove Me
End Sub

============================================================

FCxCenterForm (FormName)
Action: Function will place the specified form in the center of the screen.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxCenterForm Me
End Sub

============================================================

FCxFindReplace1st (InitString, Find, Replace)
Action: Action: Function processes and returns the modified
InitString. To process
InitString the function looks for the first instance of the input in the find argument and
replaces it with the input from the
replace argument.
Example:

Private Sub Command1_Click()
' // This example looks at Text1.Text for Text2.Text and the first
' // match it finds it replaces with Text3.Text
Text1.Text = TotalUtil1.FCxFindReplace1st (Text1.Text, Text2.Text, Text3.Text)
End Sub

============================================================

FCxFindReplaceAll (InitString, Find, Replace)
Action: Function processes and returns the modified
InitString. To process InitString the
function looks for all instances of the input in the
find argument and replaces them with
the input from the
replace argument.
Example:

Private Sub Command1_Click()
' // This example looks at Text1.Text for Text2.Text and all the
' // matches it finds it replaces with Text3.Text
Text1.Text = TotalUtil1.FCxFindReplaceAll (Text1.Text, Text2.Text, Text3.Text)
End Sub

============================================================

FCxFlashWindow (FormName)
Action: Function will flash the specified form untill FCxStopFlashWindow is executed.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxFlashForm Me
End Sub

============================================================

FCxGMP_X (No Arguments)
Action: Function will return the current X position of the mouse.
Example:

Private Sub Command1_Click()
MsgBox "The current X position of the mouse is: " & TotalUtil1.FCxGMP_X
End Sub

============================================================

FCxGMP_Y (No Arguments)
Action: Function will return the current Y position of the mouse.
Example:

Private Sub Command1_Click()
MsgBox "The current Y position of the mouse is: " & TotalUtil1.FCxGMP_Y
End Sub

============================================================

FCxLaunchCPA (CPAname)
Action: Function will launch a control panel applet specified in the input in the

CPAname
argument.
TIP: To find control panel applets do a search on "*.cpl" (without the quotes)
in your system directory.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxLaunchCPA "timedate.cpl"
End Sub

============================================================

FCxMakeNormal (FormName)
Action: Function will reverse the effects of FCxMakeTop.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxMakeNormal Me
End Sub

============================================================

FCxMakeTop (FormName)
Action: Function will Place the specified form on top of all the other windows.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxMakeTop Me
End Sub

============================================================

FCxOpenMail (SendTo)
Action: Function will open default e-mail program's compose message dialog with the
input
into the
SendTo argument as text in the "to" field.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxOpenMail "user@example.com"
End Sub

============================================================

FCxReturnPath (FolderName)
Action: Function will return the full path of one of three critical windows folders based on
input into the
FolderName argument.
Valid input: System, Windows, and Temp
Example:

Private Sub Command1_Click()
MsgBox TotalUtil1.FCxReturnPath ("System")
End Sub

============================================================

FCxSetMousePos (X, Y)
Action: Function will move the mouse cursor to the X and Y locations inputted.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxSetMousePos 300, 300
End Sub

============================================================

FCxSetWallpaper (FileName)
Action: Function will load a bitmap file (
FileName) into windows as the default wallpaper.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxSetWallpaper "C:\somebitmap.bmp"
End Sub

============================================================

FCxShellNav (FileName)
Action: Function will open the specified file based on its extension in its default application.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxShellNav "C:\"
' // Or...
' //TotalUtil1.FCxShellNav "http://www.microsoft.com"
' // Or...
' // TotalUtil1.FCxShellNav "C:\somebitmap.bmp"
' // Etc... You can really just put in a path and it will do the rest!
End Sub

============================================================

FCxStopFlashWindow (No Arguments)
Action: Function will cause the window specified in FCxFlashWindow to stop flashing.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxStopFlashWindow
End Sub

============================================================

FCxTransparent (FormName)
Action: Function will cause the specified form (but not the controls) to turn transparent.
Bug: The function does not always paint correctly.
Example:

Private Sub Command1_Click()
TotalUtil1.FCxTransparent Me
End Sub

============================================================

STxLoadIcon (FormName, MenuName)
Action: Function will load current icon of the form in the
FormName argument into the
system tray and binds the menu stated in the
MenuName argument to it.
Example:

Private Sub Command1_Click()
' // in this example; a menu that has the name "traymnu" exists on the same form as
' // the command button and it has at least one item.
TotalUtil1.STxLoadIcon Me, traymnu
End Sub

============================================================

STxClearIcon (No Arguments)
Action: Function will remove an icon placed in the system tray by STxLoadIcon.
Example:

Private Sub Command1_Click()
TotalUtil1.STxClearIcon
End Sub

============================================================

3) Events

STxClick (Left)
RaiseTime: Event will be raised when user clicks on the system tray icon loaded by
STxLoadIcon.
Example:

Private Sub TotalUtil1_STxClick(Left As Boolean)
If Left = True Then
MsgBox "You left clicked the sytem tray icon!"
End If
End Sub

============================================================

STxDBLClick (Left)
RaiseTime: Event will be raised when user clicks on the system tray icon loaded by
STxLoadIcon.
Example:

Private Sub TotalUtil1_STxDBLClick(Left As Boolean)
If Left = False Then
MsgBox "You right double clicked the sytem tray icon!"
End If
End Sub

============================================================

STxMouseUp (Left)
RaiseTime: Event will be raised when user releases the mouse button after clicking on
the sysem tray icon loaded by STxLoadIcon.
Example:

Private Sub TotalUtil1_STxMouseUp(Left As Boolean)
If Left = True Then
MsgBox "you released the left mouse button after clicking on the system tray icon!"
End If
End Sub

============================================================

4) Properties

QuietErrors
Action: Property will cause all internal control errors not to be displayed.

============================================================

STxMenu
Action: Propery controls whether the popup menu on the icon in the system tray
loaded by STxLoadIcon is enabled or not.

============================================================

STxTrayTTT
Action: Property controls the ToolTipText on the icon in the system tray loaded by
STxLoadIcon.

============================================================

2) License / Disclaimer


You should carefully read the following terms and conditions before
using this software. Your use of this software indicates your
acceptance of this license agreement and warranty.

Disclaimer of Warranty:


THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED
"AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF
MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER
EXPRESSED OR IMPLIED.


NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS PROGRAM.

Distribution:

You may redistribute copies of this software, but you may offer
such copies ONLY IDENTICAL TO THE ORIGINAL, including the
software and documentation. You are specifically prohibited from
charging or requesting donations for any such copies.
You are also prohibited from distributing the software and/or
documentation with commercial products without prior
WRITTEN permission of the author.


Placing this software on any site which charges indirectly or directly
for access to file downloading or accessing areas is strictly prohibited.

1999 (c) Robert Venables