myMsgBox Function

Syntax : result=winMsgBox.myMsgBox(message[,buttons][,title][,font][,size])

Part Type Description
result Integer Indicates which button was pressed.
Refer to the list below for returned values.
  • 1=OK Pressed
  • 2=Cancel Pressed
  • 3=Abort Pressed
  • 4=Retry Pressed
  • 5=Ignore Pressed
  • 6=Yes Pressed
  • 7=No Pressed
message String Any valid string expression.
This parameter contains the main message of the dialog.
The following simple markup codes can be included in the
text of the message to change colors and effects.
  • <S> - Strong [bold] text
  • <I> - Italic
  • <U> - Underline
  • <N> - Normal [reset to plain black text]
  • <R> - Red
  • <O> - Orange
  • <Y> - Yellow
  • <G> - Green
  • <B> - Blue
  • <P> - Purple
  • <X> - Black
  • <W> - White
buttons Integer Optional code indicting the icon and choice of buttons
displayed in the message box. Default value is 0.
The value to specify is the SUM of the desired value
from each of the below lists.

Group 1 : Buttons
  • 0 [&H0000] - Ok Button Only
  • 1 [&H0001] - Display OK and Cancel buttons.
  • 2 [&H0002] - Display Abort, Retry and Ignore Buttons
  • 3 [&H0003] - Display Yes, No and Cancel Buttons
  • 4 [&H0004] - Display Yes and No Buttons.
  • 5 [&H0005] - Display Retry and Cancel Buttons

Group 2 : Icon
  •  0 [&H0000] - No Icon
  • 16 [&H0010] - Stop Sign Icon.
  • 32 [&H0020] - Question Mark Icon.
  • 48 [&H0030] - Caution Triangle Icon.
  • 64 [&H0040] - Note Icon.
  • 80 [&H0050] - Information Icon.

Group 3 : Default Button
  •   0 [&H0000] - First Button
  • 256 [&H0100] - Second Button
  • 512 [&H0200] - Third Button
  • 768 [&H0300] - No button

Group 4 : Icon Size
  •     0 [&H0000] - default size
  •  4096 [&H1000] - 32 x 32
  •  8192 [&H2000] - 64 x 64
  • 12288 [&H3000] - 96 x 96 [default]
  • 16384 [&H4000] - 128 x 128
Title String Optional text displayed in the Title Bar
Font String Optional Fontname to display text with.
Default is "System"
Size Integer Optional size for display Font.
Default is 0





myInputBox Function

Syntax : result=winMsgBox.myInputBox(message[,default][,icon][,title][,font][,size])

Part Type Description
result String Indicates the text value entered by the user.
If CANCEL were pressed, the default value is returned.
message String Refer to myMsgBox for details.
default string Default value for input string
icon Integer Refer to myMsgBox BUTTONS for Details.
Note : ONLY "OK and CANCEL" buttons are displayed
Title String Optional text displayed in the Title Bar
Font String Optional Fontname to display text with.
Default is "System"
Size Integer Optional size for display Font.
Default is 0





GetFont Method

Displays a custom Font selection dialog, with optional ability to select color and style

Syntax : result=winFontPicker.GetFont(ByRef fontinfo[,show_style])

Part Type Description
result Boolean Returns TRUE is user clicks OK, False if the user cancels.
fontinfo classFont Font information passed to GetFont and returns data selected
by the user. Note the usage of ByRef in the parameter list.
show_style boolean If TRUE, dialog allows entry of Bold/Italic and
Underline effect, as well as selection of Color. If FALSE
only font name and size can be selected.





classFONT Class

Object that defines a font and its attributtes


Properties
Name Type Description
name string name of the font [default=SYSTEM]
size integer size of the font [default=0]
textcolor color font color [default=Black]
bold boolean is Font Bolded [default=False]
italic boolean is Font Italic [default=False]
Underline boolean is Font Underlined [default=False]





classFileInfo Class

Various File/Volume related functions. This is embedded in a module named modFILEINFO and should be referenced using the included property "FileInformation"


NOTE: The code in this module/class is based on work published by Charles Yeoman.

Syntax : FileInformation=new modFILEINFO.clsFILEINFO


Methods
Name Parameters Return Type Description
GetFileExtension f as FolderItem String Extension of the file described by the FolderItem
GetFileTypeFromFolderItem f as FolderItem Integer Type of File described by the FolderItem
  • -1 - unknown
  • 0 - File
  • 1 - Directory
  • 2 - Bundle
GetIconFromExtension extension as string,
size as Integer,
background_color as color
picture return the Icon associated with the specified file extension.
size indicates the desired height and width of the returned icon picture.
background_color is just that. [this routine does not support masks]
GetIconFromFolderItem f as folderitem,
size as Integer,
background_color as color
picture return the Icon associated with the specified folderitem.
see GetIconFromExtension for info on other parameters.
GetIconFromItem item as string,
size as Integer,
background_color as color
picture return the Icon associated with the specified item.
see GetIconFromExtension for info on other parameters.
Finder Sidebar Items
  • "Desktop"
  • "Home"
  • "Applications"
  • "Documents"
  • "Movies"
  • "Music"
  • "Pictures"
  • "Library"
  • "Downloads"
  • "Favorites"
MsgBox Items
  • "Stop"
  • "Caution"
  • "Note"
  • "Question"
  • "Info"
GetIconFromType kind as string,
size as Integer,
background_color as color
picture return the Icon associated with the filetype code.
see GetIconFromExtension for info on other parameters. I don't have all the file type codes documented... but some are :
  • "FNDR" - Finder
  • "fldr" - generic folder
Note : they ARE case sensitive
GetKindString f as folderitem String return the "description" of the type of file in folderitem.
This is usually the description in Finders "Kind" column.
GetVolumeType f as folderitem Integer return the type of volume described in folderitem.
  • 0 - Unknown
  • 1 - Internal
  • 2 - External
  • 3 - Network