Test program for use with new library code:
' sample application which uses ezresize.inc
'
' Portions: Copyright Christopher R. Boss, 2003 to 2006 , All Rights Reserved !
' Registered EZGUI 4.0 users may use this code Royalty Free !
'
' ======================================
' [PROTECTED CODE] Do NOT Edit !
' ======================================
'
#COMPILE EXE
#DIM ALL ' This is helpful to prevent errors in coding
#INCLUDE "C:\ezgui40pro\includes\ezgui40.inc" ' EZGUI Include file for Declares
#INCLUDE "C:\ezgui40pro\includes\ezresize.inc"
'
DECLARE FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
DECLARE SUB EZ_FORM1_Display(BYVAL Parent$)
DECLARE SUB EZ_FORM1_Design()
DECLARE SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
'
%FORM1_BUTTON1 = 100
%FORM1_BUTTON2 = 105
%FORM1_BUTTON3 = 110
%FORM1_BUTTON4 = 115
%FORM1_LISTVIEW1 = 120
%FORM1_LISTVIEW2 = 125
%FORM1_COMBOBOX1 = 130
%FORM1_LISTBOX1 = 135
'
DECLARE SUB FORM1_BUTTON1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON2_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON3_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON4_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
DECLARE SUB FORM1_LISTVIEW1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTVIEW2_Fill(BYVAL Mode&)
DECLARE SUB FORM1_LISTVIEW2_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_COMBOBOX1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTBOX1_Events(MyID&, CMsg&, CVal&, Cancel&)
'
#INCLUDE "C:\ezgui40pro\includes\ezwmain.inc" ' EZGUI Include file for WinMain
'
SUB EZ_Main(VerNum&) ' (PROTECTED)
EZ_Reg %EZ_CUSTID,%EZ_REGNUM
EZ_DefImageFolder "Graphics"
EZ_AllowCommandEvents 0
EZ_DefFont 6, "Arial", 10, "V"
EZ_DefFont 7, "Courier New", 10, "F"
EZ_DefFont 8, "Times New Roman", 10, "V"
EZ_DefFont 9, "Modern", 10, "V"
EZ_DefSystemColor 32, 4
EZ_DefSystemColor 33, 5
EZ_DefSystemColor 34, 15
EZ_DefSystemColor 35, 24
EZ_DefColorL 36, &HB96FFF
EZ_DefColorL 37, &H14AB9F
EZ_DefColorL 38, &H47A7FF
EZ_DefColorL 39, &HD2AACF
EZ_DefColorL 40, &H1CD5E3
EZ_DefColorL 41, &HBC8943
EZ_DefColorL 42, &H6C6AB7
EZ_DefColorL 43, &HDD4489
IF Main_Initialize(VerNum&) THEN
EZ_FORM1_Display ""
END IF
END SUB
'
SUB EZ_DesignWindow(FormName$) ' (PROTECTED)
SELECT CASE FormName$
CASE "FORM1"
EZ_FORM1_Design
CASE ELSE
END SELECT
END SUB
'
SUB EZ_Events(FormName$, CID&, CMsg&, CVal&, Cancel&) ' (PROTECTED)
SELECT CASE FormName$
CASE "FORM1"
EZ_FORM1_ParseEvents CID&, CMsg&, CVal&, Cancel&
CASE ELSE
END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE] You may Edit !
' ======================================
'
FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
LOCAL RV&
RV&=1
FUNCTION=RV&
END FUNCTION
'
'<<BEGINFORM>> "FORM1"
'
' ======================================
' [PROTECTED CODE] Do NOT Edit !
' ======================================
'
SUB EZ_FORM1_Display(BYVAL Parent$) ' (PROTECTED)
EZ_Color -1, -1
EZ_Form "FORM1", Parent$, "Auto Resize Demo", 0, 0, 83, 29, "CZ"
END SUB
'
SUB EZ_FORM1_Design() ' (PROTECTED)
LOCAL CText$
EZ_Color-1,-1
EZ_UseFont 4
EZ_Button %FORM1_BUTTON1, 4, 2, 16, 2, "Button 1", "T"
EZ_Color-1,-1
EZ_UseFont 4
EZ_Button %FORM1_BUTTON2, 24, 2, 16, 2, "Button 2", "T"
EZ_Color-1,-1
EZ_UseFont 4
EZ_Button %FORM1_BUTTON3, 43, 2, 16, 2, "Button 3", "T"
EZ_Color-1,-1
EZ_UseFont 4
EZ_Button %FORM1_BUTTON4, 63, 2, 16, 2, "Button 4", "T"
EZ_Color-1,-1
EZ_UseFont 4
EZ_ListView %FORM1_LISTVIEW1, 4, 14, 37, 14, "Column 1{15}|Column 2{15}{C}|Column 3{15}{R}|", "SVT"
FORM1_LISTVIEW1_Fill -1
EZ_Color-1,-1
EZ_UseFont 4
EZ_ListView %FORM1_LISTVIEW2, 41, 14, 39, 14, "Column 1{15}|Column 2{15}{C}|Column 3{15}{R}|", "SVT"
FORM1_LISTVIEW2_Fill -1
EZ_Color-1,-1
EZ_UseFont 4
EZ_ComboBox %FORM1_COMBOBOX1, 4, 12, 76, 9, "Item 1|Item 2|Item 3|Item 4|Item 5|", "SAVT"
EZ_SelectItem "Form1", %FORM1_COMBOBOX1, 0
EZ_Color-1,-1
EZ_UseFont 4
EZ_ListBox %FORM1_LISTBOX1, 4, 5, 75, 6, "Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|Item 7|Item 8|Item 9|Item 10|Item 11|Item 12", "STV"
END SUB
'
SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&) ' (PROTECTED)
SELECT CASE CID&
CASE %EZ_Window
FORM1_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_BUTTON1
FORM1_BUTTON1_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_BUTTON2
FORM1_BUTTON2_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_BUTTON3
FORM1_BUTTON3_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_BUTTON4
FORM1_BUTTON4_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_LISTVIEW1
FORM1_LISTVIEW1_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_LISTVIEW2
FORM1_LISTVIEW2_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_COMBOBOX1
FORM1_COMBOBOX1_Events CID&, CMsg&, CVal&, Cancel&
CASE %FORM1_LISTBOX1
FORM1_LISTBOX1_Events CID&, CMsg&, CVal&, Cancel&
CASE ELSE
FORM1_Events CID&, CMsg&, CVal&, Cancel&
END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE] You may Edit !
' ======================================
'
SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
SELECT CASE CID&
CASE %EZ_Window
SELECT CASE CMsg&
CASE %EZ_Loading
CASE %EZ_Loaded
LOCAL W!, H!
EZ_GetSize "Form1", W!, H!, 0
EZ_SetFormMinMax "Form1", W!, H!, 999,999
EZ_InitRTForm "Form1", "BUTTON", 3
EZ_InitRTForm "Form1", "<>BUTTON", 1
EZ_SetRT "Form1", %FORM1_LISTBOX1, 4
CASE %EZ_Started
CASE %EZ_Size
EZ_ResizeRTForm "Form1"
CASE %EZ_Close
EZ_FreeRTForm "Form1"
CASE ELSE
END SELECT
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_BUTTON1_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Click
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_BUTTON2_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Click
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_BUTTON3_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Click
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_BUTTON4_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Click
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
END SUB
'
SUB FORM1_LISTVIEW1_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Selected
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_LISTVIEW2_Fill(BYVAL Mode&)
END SUB
'
SUB FORM1_LISTVIEW2_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Selected
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_COMBOBOX1_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Change
CASE ELSE
END SELECT
END SUB
'
SUB FORM1_LISTBOX1_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Change
CASE ELSE
END SELECT
END SUB
'
'<<END ALL FORMS>> UnKnown Routines follow:
#IF %EZ_NOSKIPCODE
#ENDIF 'PARSE END
'