WinGui by flexto2
Sub/function Quick reference:

SUB Winmask (x1&, y1&, w&, h&)                          Hide a screen Area
        First point (x1&,y1&) w&=width h&=height

SUB MoveWindow (Stax&, Stay&, FormObj() AS ANY)         Move a Window
        Base point of window (Stax&,Stay&)
        FormObj() Window List object

To create a Men:
Mcor% = 0      This is Position pointer for ADDMEN

MenX% = 10              'Men X Position (Pixel)
MenY% = 20              'Men Y Position (Pixel)
MenM% = 20              'Men Width (~ Pixel/8)

sel = 0                 'Select 1 Default Men

SUB AddMen (Strm$, typ&, Par&, Min&, Max&, Men$(), Menu() AS ANY)
        Add an Object in Vmen:
        Strm$ = Men String
        Men$() = Men String Array
        Menu() = Men Object Array
        Typ& = Type Of Object

CONST MnMen = 0  'Simple Men:
        Par&,Min&,Max& NOT USED!

CONST MnDiv = 1  'Oriz. Line:
        Par&,Min&,Max& NOT USED!

CONST MnChk = 2  'Checkbox in men:
        Par&=0 Value 0 False , 1 True
        Min&,Max& NOT USED!

CONST MnOpt = 3  'Option in men:
        Par&=0 Value 0 False , 1 True
        Min&=Option ID
        Max& NOT USED!

CONST MnVal = 4  'Value in Men:
        Par&=Current value
        Min&=Min
        Max&=Max Value

CONST MnTxt = 5  'TextBox in Men:
        Par& = Not used
        Min& = String min len.
        Max& = String max len.
        String:
        Men:DefaultString

CONST MnDef = 6  'Default Men
        Par&,Min&,Max& NOT USED!

CONST MnIco = 7  'Men + Icon
        Par& = Icon ASCII code in font RCOPT2 (B1.Font&())
        Min&,Max& NOT USED!
       
ex.:
AddMen "Mouse", MnIco, 164, 0, 0, Men$(), Menu()
AddMen "WC", MnIco, 242, 0, 0, Men$(), Menu()

Vmenu Men$(), Menu(), May, sel, Menu1&   'do the Men
        Men$()= Men string array
        Menu()= Men Object array
        May=Visible Height of Vmen in Line (~ pixel/16)
Return:
        Sel=Selected Option
        Sel=-1 for ESC

SUB MplayB (fil$, Rate%)        Playback Audio File
        Fil$=Filename
        Type of file: WAVE PCM RAW 8 BITS UNSIGNED MONO
        Rate%=Sample Rate

FUNCTION IsDigPak% ()           Check Audio Driver
                                (See DRV Directory...)

FUNCTION DacIsDone% ()          Check if Wave Audio is now plaing

SUB stopw ()                    Terminate all Wave playback

Sub Rcprint2 (d$, c&, c1&)      Graphic print
        B1.Font&()=Font RCOPT2 8x16 memory
        Graphic cursor position (Rx2%,Ry2%)
        d$ = String
        c&=Font color
        C1&=Font Background color (0=No background!)
      
SUB TastG (Tit$, x&, y&, x1&, y1&, Ct&, Tyt&)   Draw Button
        Tit$=Caption
        (x&,y&) = First point
        (x1&,y1&) = Second Point
        ct& = Ink color for text
        Tyt& = Type of Button:
                Bit 1 Font 0 8x8 , 1 8x16
                Bit 2 Border

SUB Rcprint (d$, c&, c1&)       Graphic print
        A1.Font&()=Font A1 8x8 memory
        Graphic cursor position (Rx%-8,Ry%)
        d$ = String
        c&=Font color
        C1&=Font Background color (0=No background!)

FUNCTION FindControl& (eve$, Obj() AS ANY)
        Find a eve$ (EVENTID) Object in Obj() (From object list)

SUB Tast (txt$, Xp&, Yp&, Xf&, Yf&, Stile32&) Graphic Button
        txt$=Text
        (Xp&,Yp&) First Point
        (Xf&,Yf&) Second Point
        Stile32& = Style Of Button:
                Stile32& = &H qwerty
                q = Selection color
                w = Selection Type (06) 0=Absent
                e = Color
                r = External frame
                        0 None
                        1 Thin 3D Border (Back Color in y)
                        2 Color (e) + Thin 3D Border
                t = Button Style:
                       0 Clicked
                       1 Normal
                       2 Extended
                       3 Clicked
                       4 Absent
                y = Inernal frame back color
                u = Text Color

SUB Win (Tit$, Xp&, Yp&, Xf&, Yf&, Ci&, Style32&)
        Draw window
        Tit$ = Title
        Window Position (Xp&,Yp&)-(Xf&,Yf&)
        Ci& = Background Color
        Style32& = Style Dword:
               Style32& = &Hqwertyu
        q Form style
               0 = No control box      Titlebar 1
               1 = Controlbox 1        Titlebar 2
               2 = Controlbox 2        Titlebar 1
               3 = Controlbox 3        Titlebar 2
               4 = Controlbox 4        Titlebar 1
               5 = Controlbox 5        Titlebar 2
        w number of Border Cuts
        e Border Color
        r Border Style
                0 thin Border 3D
                1 double thin Border 3D
                2 Frame 3D + InLine
                3 Simple 3D Button
                4 Double border (Color Cii)
                5 Windows Border (Color Cii)
        t Border Size
        y titlebar Color
        u Title ink color

SUB palcol (c&, R&, g&, B&)
        Palette set:
                c&=Color register
                R&,G&,b& r,g,b Value 063

SUB Loadfont2 (n$, f$, Ram&())          Load a font in array
        N$ = File Name
                (*.CPI) Multi font file (see FNT directory...)
                (*.FON) Single Font file
        F$=Font Internal name
        Ram&()  Font Array

SUB Mouseturn (n&)
        n& = 1 Enable / 0 Disable Mouse Cursor

SUB mouse (x&, y&, c&)
        Get Mouse pointer (x&,y&)
        c& = Bit 1 L. Button
             Bit 2 R. Button
             Bit 3 C. Button

SUB win3 (Xp&, Yp&, Xf&, Yf&, Sp&, Mn$, T$, Ci&, cb&, mo&, cm&, byi$)
        Draw SubWindow
        Position: (Xp&, Yp&)-(Xf&, Yf&,)
        Sp& = border Size
        Mn$ = [sub. title font 8x8]
        T$ = Title
        Ci& = Background color
        cb& = Border Color
        Mo& = Border Decoration /style  06
        Cm& = decoration Color
        Byi$ = [Bitstream backgound image]

SUB RcPrintf (d$, c&, c1&, Ram&())      Graphic print
        Ram&()=User Font MxN memory
        Graphic cursor position (Rx2%,Ry2%)
        d$ = String
        c&=Font color
        C1&=Font Background color (0=No background!)

SUB LoadForm (nf$, FormObj() AS ANY, Formdata&(), Hdl&)
        Window Loader
        nf$ = File name (*.qfr) (see QBVB.BAS ...)
        FormObj() form Obj List
        FormData&() From Data Array (Images/Strings)
        Hdl& = Handle of file
                0 For Nf$ (file Name) direct load
                <>0 For load from current opened file at curren position

SUB FormRefresh (Stax&, Stay&, FormObj() AS ANY, Formdata&(), ff&)
        Refresh a Window
                Window position (Stax&,Stay&)
                FormObj() Window object list
                FormData&() Window data array
                ff& Refresh Flagh

SUB Frame (Xp&, Yp&, Xf&, Yf&, Sp&, Ty&, Ci&, Cii&)
        Draw a frame
        Frame Position (Xp&, Yp&)-(Xf&, Yf&)
        Sp& = Border Size
        Ci& = Background color
        Cii& = Frame color
        Ty& = Type of frame:
                0 thin Border 3D
                1 double thin Border 3D
                2 Frame 3D + InLine
                3 Simple 3D Button
                4 Double border (Color Cii)
                5 Windows Border (Color Cii)

FUNCTION FontI& (i&, Ram&())
        Get Font info:
        Ram&() Fort
        i& = Value to return:
        0 Byx = Bytes * X
        1 Byy = Bytes * Y
        2 Bpx = Bytes * pX
        3 Bpy = Bytes * pY
        4 Org = 1 char.
        5 Max = Width of char.
        6 May = Height of char.
        5 Screen width in char.
        6 Screen height in char.
        7 Screen width (640)
        8 Screen Height (480)
        9 Current Screen mode Byte at 0000h:0449h

FUNCTION GetCaption2$ (jObj AS ANY, jDat() AS LONG)
        Return a String/Caption/Data of Window's Object
        Jobj = One object in form objectlist
        Jdat() = form data array

FUNCTION Toc& (x&, y&, x1&, y1&, x2&, y2&)
        Return true if the point (x&,y&) is in
              (x1&, y1&)-(x2&, y2&) Area

FUNCTION RcCodice$ (di$)
        Scramble/UnScramble Di$ String

SUB ExecForm (eve$, Stax&, Stay&, Obj() AS ANY, Dati&(), ff&)
        Exec. a Window
                Window position (Stax&,Stay&)
                Obj() Window object list
                Dati&() Window data array
                ff& Refresh Flagh
                Eve$ = Return the EVENT for keypress/Click
        Default ObjectID:
                Form EVENTID = "V4.1"
                ControlBox EVENTID = "V4.1_CTL"
                Form Moved EVENTID = "V4.1_MOV"

SUB Msgbox (Message$, tas&, Tit$)
        Do a message box
                Message$ = your message
                tas& = Button flag:
                1 Ok
                2 Cancel
                3 Retry
                4 Close
                5 Continue
                6 ?

SUB Rdint (inte&, Segg&, Ptr&)
        Get an Interrupt Vector
        Inte& = Interrupt Vector& 0255
        Segg& = Segment
        Ptr& = Address

GetIni INI$,Parn$(),Zon$,MaxP,ZZZ
        Get data from .INI file:
        ini$ = Filename (*.INI)
        Zon$ = ini file Section
        MaxP = Ubound(Parn$())
        Parn$() = Array of names
        ZZZ = file Handle:
                Use 0 For Open INI$ file
                Use <>0 for read the opened file HDL from current position
Return: Parn$() = Param. from file INI

Ini file Example:
sample.ini
------------------
[MYPAR]
Fonts=Font3.cpi
Path=C:\
Systemfont=RCOPT2
------------------
redim parn$(3)
parn$(0)="PATH"
parn$(1)="FONTS"
parn$(2)="SYSTEMFONT"
parn$(3)="BLABLA"
MaxP=3
GetINI "sample.ini",Parn$(),"MYPAR",MaxP,0

Return:

parn$(0)="C:\"
parn$(1)="Font3.cpi"
parn$(2)="RCOPT2"
parn$(3)=""                     'not Found!

-----------------

SUB Linput (p$, d$, cp, cd, c1, lena, Fo&())
'Graphic line input
        p$ = Prompt
        d$ = Return String/Default String
        cp = Ink color for prompt
        cd = ink color for input line
        c1 = Background Color (Don'T use 0!!!)
        Lena = Max Lenght of string
        Fo&() = User Font
        (Rx2%,Ry2%) = Graphic position

SUB Desel (Ermf, Menu() AS Menu)
        Menu() men object list
        Ermf= 0 Enable/ 1 Disable Last men object

