Wednesday, December 19, 2007
misc windows and system
bcx basic manual home
MsgBox
example
i = MsgBox ( "This is a message", "BCX Demo", 3+64) ' 3=YNC, 64=Info Icon
usage options (after the parentieses)
OK 0 Display OK button only.
OKCancel 1 Display OK and Cancel buttons.
AbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
YesNoCancel 3 Display Yes, No, and Cancel buttons.
YesNo 4 Display Yes and No buttons.
RetryCancel 5 Display Retry and Cancel buttons.
Critical 16 Display Critical Message icon.
Question 32 Display Warning Query icon.
Exclamation 48 Display Warning Message icon.
Information 64 Display Information Message icon.
DefaultButton1 0 First button is default.
DefaultButton2 256 Second button is default.
DefaultButton3 512 Third button is default.
Panel
example
Panel X1,Y1,X2,Y2,Fg,Bg,32,1
SYSTEM INFORMATION
GetEnvironmentVariable
example
GetEnvironmentVariable (A$,Result$,255)
possible values for A$ are
"COMSPEC"
"PROMPT”
"TEMP"
"winbootdir"
"windir"
"PATH"
GetDriveType
example
k = GetDriveType(a$)
possible values for A$ are
DRIVE_REMOVABLE
DRIVE_FIXED
DRIVE_REMOTE
DRIVE_CDROM
DRIVE_RAMDISK
SetFileAttributes
example
SetFileAttributes(t$,a)
possible values for a are
FILE_ATTRIBUTE_ARCHIVE -- The file is an archive file
FILE_ATTRIBUTE_HIDDEN -- The file is hidden
FILE_ATTRIBUTE_NORMAL -- The file has no other attributes set
FILE_ATTRIBUTE_OFFLINE -- The data of the file is not immediately available
FILE_ATTRIBUTE_READONLY -- The file is read-only
FILE_ATTRIBUTE_SYSTEM -- The file is part of the operating system
FILE_ATTRIBUTE_TEMPORARY -- The file is being used for temporary storage
ExitWindowsEx ( EWX_LOGOFF, 0 )
possible arguments for ExitWindowsEx are
EWX_FORCE Forces processes to terminate. When this flag is set,
Windows doesn't send WM_QUERYENDSESSION and WM_ENDSESSION messages to
running applications in the system. This can cause the applications to
lose data. Therefore, you should only use this flag in an emergency.
EWX_LOGOFF Shuts down all processes running in the security context of the
process that called the ExitWindowsEx function and logs the user off.
EWX_POWEROFF Shuts down the system and turns off the power, if supported.
EWX_REBOOT Shuts down the system and then restarts the system.
EWX_SHUTDOWN Shuts down the system to a point at which it is safe to
turn off the power. All file buffers have been flushed to disk, and
all running processes have stopped
MsgBox
example
i = MsgBox ( "This is a message", "BCX Demo", 3+64) ' 3=YNC, 64=Info Icon
usage options (after the parentieses)
OK 0 Display OK button only.
OKCancel 1 Display OK and Cancel buttons.
AbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
YesNoCancel 3 Display Yes, No, and Cancel buttons.
YesNo 4 Display Yes and No buttons.
RetryCancel 5 Display Retry and Cancel buttons.
Critical 16 Display Critical Message icon.
Question 32 Display Warning Query icon.
Exclamation 48 Display Warning Message icon.
Information 64 Display Information Message icon.
DefaultButton1 0 First button is default.
DefaultButton2 256 Second button is default.
DefaultButton3 512 Third button is default.
Panel
example
Panel X1,Y1,X2,Y2,Fg,Bg,32,1
SYSTEM INFORMATION
GetEnvironmentVariable
example
GetEnvironmentVariable (A$,Result$,255)
possible values for A$ are
"COMSPEC"
"PROMPT”
"TEMP"
"winbootdir"
"windir"
"PATH"
GetDriveType
example
k = GetDriveType(a$)
possible values for A$ are
DRIVE_REMOVABLE
DRIVE_FIXED
DRIVE_REMOTE
DRIVE_CDROM
DRIVE_RAMDISK
SetFileAttributes
example
SetFileAttributes(t$,a)
possible values for a are
FILE_ATTRIBUTE_ARCHIVE -- The file is an archive file
FILE_ATTRIBUTE_HIDDEN -- The file is hidden
FILE_ATTRIBUTE_NORMAL -- The file has no other attributes set
FILE_ATTRIBUTE_OFFLINE -- The data of the file is not immediately available
FILE_ATTRIBUTE_READONLY -- The file is read-only
FILE_ATTRIBUTE_SYSTEM -- The file is part of the operating system
FILE_ATTRIBUTE_TEMPORARY -- The file is being used for temporary storage
ExitWindowsEx ( EWX_LOGOFF, 0 )
possible arguments for ExitWindowsEx are
EWX_FORCE Forces processes to terminate. When this flag is set,
Windows doesn't send WM_QUERYENDSESSION and WM_ENDSESSION messages to
running applications in the system. This can cause the applications to
lose data. Therefore, you should only use this flag in an emergency.
EWX_LOGOFF Shuts down all processes running in the security context of the
process that called the ExitWindowsEx function and logs the user off.
EWX_POWEROFF Shuts down the system and turns off the power, if supported.
EWX_REBOOT Shuts down the system and then restarts the system.
EWX_SHUTDOWN Shuts down the system to a point at which it is safe to
turn off the power. All file buffers have been flushed to disk, and
all running processes have stopped