WinGui V2.0B
Quick Reference




SUB Doevents (Mx&, My&, Mb&, Cwin&, Wine$, Eve2$)
This is the main function of WinGui V2.00
Do all events of gui and return window EVE, window ID, Object EVE

WinGui V2.00 System



Mx& Return MouseX
My& Return MouseY
Mb& Return Mouse Buttons
Cwin& Return Current Windows (Focus window)
Wine$ Return Current window name (EVE)
Eve2$ Return current Object EVE


SUB Msgbox (Msg$, tas$(), tas%, Icon$, tit$, F3D%)
Do a message box
Msg$ Message Text
tas$() Buttons Array
This is an array of button's string
The last bust be ""
MSGBOX MUST HAVE BUTTON/S!
tas% Select the default button and return the clicked button ID Array Tas$(index)
Icon$ Icon in MsgBox use "" for nothing
Default Database Icons for MSGBOX

@MSGDAN MsgBox Wharning
@MSG! MsgBox !
@MSGHELP MsgBox Help
@MSGINF1 MsgBox "i" (Win9x Style)
@MSGINF2 MsgBox (i) (Win3.11 Style)
@MSGSTOP MsgBox Stop

tit$ Title of Window
F3D% Style Flaghs
Bit 0 Red Border
Bit 1 3D Window


SUB SendEvent (Fr AS ANY, Mx&, My&, Eve2$, Cobj&)
Used By WinGui Send a Click in a window
Fr AS ANY Window
Mx& Mouse X
My& Mouse Y
Eve2$ Return the EVE
Cobj& Return Current Object ID


FUNCTION FindImG% (NAM$)
Return an Image id from a name
NAM$ Image Name


SUB WaitMouse ()

SUB AddItem (ctl&, Itm$)
Add An intem in a list/combobox
ctl& Object id
Itm$ Item string


FUNCTION FindC& (Hwnd&, ev$)
Find a Obj id from EVE
Hwnd& Window ID
ev$ EVE


SUB VesaPcopy (So&, De&)
Copy a video page
So& Source page (Not implemented in beta version)
De& Dest. page (Not implemented in beta version)


SUB SaveScreen (Scrn&)
Save the current screen dump
Scrn& Screen dump id


SUB LoadScreen (Scrn&)
Load a screen dump
Scrn& Screen Dump ID


SUB Border (x%, y%, W%, H%, Sz%, lu&, om&)
Draw a 3D border
x% Left
y% Top
W% Width
H% Height
Sz% Size (positive number = Up | Negative number = Down)
lu& Luminance color
om& Shadow color


SUB Olin (x%, y%, W%, c&)
Orizzontal Line
x% Left
y% Top
W% Length
c& Color


SUB Vlin (x%, y%, H%, c&)
Vertical line
x% Left
y% Top
H% Length
c& Color


SUB SetPage (N&)
Set active display page for draw
N& Page number


SUB PutShape (xx&, yy&, Sha%(), ip&)
Put a sprite on screen
xx& Left
yy& Top
Sha%() Sprite Data array
ip& Array index


SUB Capture (x&, y&, W&, H&, Ram%())
Capture a screen area
x& Left
y& Top
W& width
H& Height
Ram%() Return Buffer for data


SUB PutFrame (xx&, yy&, Ram%(), ip&)
Put into screen a captured area
xx& Left
yy& Top
Ram%() Image Data array
ip& Start Array index


FUNCTION IsVesa% ()
GuiVesa.COM Installation check
Return true if the driver was installed SUB WinMove (Whd&, wx&, wy&)
move a window
Whd& Window ID
wx& Left
wy& Top


SUB Win (x0%, y0%, W0%, H0%, tit$, R0&, R1&, st%, act%)
Window Object
x0% Left
y0% Top
W0% width
H0% Height
tit$ Title
R0& BackColor
R1& Flags
st% 3D Windows style
act% (0) normal window (-1) Active Window (-2 red border)


FUNCTION GetHdc& (Fr AS ANY)
Get windows handle from a window
Fr AS ANY Window


SUB Plot (x%, y%, c AS LONG)
Wrte a graphic pixel
x%
y%
c AS LONG color


FUNCTION GetP% (x%, y%)
Get a pixel from screen
x%
y%


SUB LoadQFX (N$, FrmI&)
Load a .QFX window in WinGui
N$ Name of file .QFX
FrmI& Return the Window ID


SUB palcol (c&, r&, G&, b&)
Change palette
c& Color id (0-255)
r& Red (0-63)
G& Green (0-63)
b& Blu (0-63)


SUB MouseTurn (N&)
Enable/disable Mouse Pointer
N& 0 disable | 1 enable


SUB lin (x1 AS INTEGER, Y1 AS INTEGER, W AS INTEGER, H AS INTEGER, c&)
Line (like in Quick Basic)
SUB Box (x%, y%, W%, H%, c&)
Draw a Box
x% Left
y% Top
W% Width
H% Height
c& Color


SUB Fillbox (x%, y%, W%, H%, c&)
Draw a filled box
x% Left
y% Top
W% Width
H% Height
c& Color


SUB Kernelmsg (Msg$, N&, tit$)
Wingui Kernel Message in Text screen
The variable NoKernrelError Enable/Disable this Fucntion
NoKernelError = (0 Enable KernelMsg | 1 Disable KernelMSG)

Msg$ Message
Use "|" to insert the "suggest" lines.
N& Flaghs
Bit 1 Main title (Disable the title "Wingui Error")
bit 2 Restore the graphic screen
bit 3 Do not terminate!
tit$ Title of message

SUB RcprintF (d$, c&, c1&, Ram%())
Graphic Print
Rx2% = Cursor X
Ry2% = Cursor Y
Fret% = Return flagh (0 Enable | 1 Disable)

d$ Text string
c& ink color
c1& BackGround color (0 = no background)
Ram%() Font Data Array


SUB clr (N&)
Clear the screen
N& Color of screen

SUB Mouse (x&, y&, c&)
Return the mouse position
This is the mouse and keyboard driver!
Return in ASKEY$ the last key pressed like INKEY$

x& Mouse X
y& Mouse Y
c& Mouse Buttons
bit 1 Left button
bit 2 Rigth button
bit 3 Center button

SUB FormRef (Fr AS ANY)
Window Refresh
Fr AS ANY Window


SUB LoadFont2 (N$, f$, Ram%())
Load a font in array
N$ SYSDATA.CPS file or other root font file
f$ Font name
Ram%() Font Data Array

SUB loadimg (tit$, O AS ANY)
Put in the screen an image from database
tit$ Empty in Beta version (unused)
O AS ANY Object structure (Obj.R0 = Image Database ID)

SUB InitGraf (ScrM&)
Initialize and set the screenm,de for Wingui
ScrM& Screen mode ID:
0 (Reset) Text 80x25 16 Colors
12 (VGA) Grp. 640x480 16 Colors
13 (VGA) Grp. 320x200 256 Colors
14 (VESA) Grp. 640x480 256 Colors
15 (VESA) Grp. 800x600 256 Colors
16 (VESA) Grp. 1024x768 256 Colors
17 (VESA) Grp. 1280x1024 256 Colors
If GuiVesa was not load the screen mode is 12


FUNCTION Toc& (x&, y&, x1&, Y1&, x2w&, y2h&)
Return true if the point (x,y) is in (x1,y1)-step(x2w,y2w) region
SUB VMMCLOSE ()
Close the virtual memory and the database
SUB VMMMount (FILN$)
Open the Virtual memory
FILN$ Swap file


SUB LoadDb (N$)
Load a database
N$ Database .QDB File name


SUB DesktopRef ()
Desktop refresh
SUB SetFocus (HDC&)
Set focus windows (BringWindowToTop)
HDC& Window ID


SUB ChangeItem (ctl&, Itn&, Itm$)
Change an item in list/combobx
ctl& Object id
Itn& Item number
Itm$ Item string


FUNCTION ListItem$ (ctl&, Itn&)
Get the item string
ctl& Object id
Itn& Item number


FUNCTION Listcount& (ctl&)
Return the number of items in lis/combobox
ctl& Object id




Common shared Variables


rx2%, ry2% = (x,y) for RcprintF
fret% = Return Flagh for RcprintF
FONTSCPI$ = Complete Path$ of SYSDATA.CPS
askey$ = Last key pressed in Doevents
Mypath$ = The your .EXE/.BAS Path
NoKernelError (0 = Enable | 1 = Disable) WinGui Kernel Error Messages
ScrWidth% = Screen Width
ScrHeight% = Screen Height
DesktopColor% = Color of desktop
Noforms% = return last ChkAll (true = the desktop is empty)
Icone% = Rumber of icon in desktop (READ ONLY)
Fliker% = (0 enable, 1 disable) VesaPcopy
temp$ = Temp files path
MousePointer%() = Mouse Pointer Sprite
Frm() AS Frm = Windows array
B1%() = B1% font 8x16 RCOPT2 (Windows gui font)
A1%() = A1% Font 7x14 Dos3 (Windows gui font)
A0%() = A0% Font 8x8 A1 (Terminals)
FON%() = Custom font MxN
GrPh%() = Active symbols (Windows gui font)
Obj() AS Obj = Global Object array
Dati$() = Caption array for object
Dbase() AS Dbase = DataBase .QDB Index
Roots() AS Roots = SYSDATA.CPS Index
Vesa%() = 8Kb Vesa Midbuffer for GUIVESA.COM




Flexto2: Flexto2@mail.com