#Include <Include\Windows.inc>
#Define TBS_AUTOTICKS &H1
#Define DTS_LONGDATEFORMAT &H4
#Define STC_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr SS_NOTIFY
#Define STC_EXTSTYLE WS_EX_STATICEDGE
#Define CMD_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_DEFPUSHBUTTON
#Define CMD_EXTSTYLE 0
#Define SHP_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr SS_BLACKRECT BOr SS_NOTIFY
#Define SHP_EXTSTYLE WS_EX_TRANSPARENT
#Define CHK_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_AUTOCHECKBOX
#Define CHK_EXTSTYLE 0
#Define OPT_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_AUTORADIOBUTTON
#Define OPT_EXTSTYLE 0
#Define FRM_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr BS_GROUPBOX
#Define FRM_EXTSTYLE WS_EX_TRANSPARENT
#Define CMB_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr CBS_DROPDOWN BOr CBS_HASSTRINGS
#Define CMB_EXTSTYLE 0
#Define LST_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr LBS_NOINTEGRALHEIGHT
#Define LST_EXTSTYLE WS_EX_STATICEDGE
#Define REC_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr ES_MULTILINE BOr ES_AUTOVSCROLL BOr ES_AUTOHSCROLL BOr ES_WANTRETURN
#Define REC_EXTSTYLE WS_EX_STATICEDGE
#Define VSB_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr SBS_VERT
#Define VSB_EXTSTYLE 0
#Define HSB_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP
#Define HSB_EXTSTYLE 0
#Define SLD_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr TBS_AUTOTICKS
#Define SLD_EXTSTYLE 0
#Define TXT_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_VSCROLL BOr WS_HSCROLL BOr WS_TABSTOP BOr ES_MULTILINE BOr ES_AUTOVSCROLL BOr ES_AUTOHSCROLL BOr ES_WANTRETURN
#Define TXT_EXTSTYLE WS_EX_STATICEDGE
#Define PRG_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP
#Define PRG_EXTSTYLE 0
#Define DAT_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP BOr DTS_LONGDATEFORMAT
#Define DAT_EXTSTYLE WS_EX_CLIENTEDGE
#Define UPD_STYLE WS_CHILD BOr WS_VISIBLE BOr WS_TABSTOP
#Define UPD_EXTSTYLE 0
Dim hwnds[], i, j, elem
Macro ComboAddString(s) = SendMessage(FbslControl, CB_ADDSTRING, 0, s)
Macro ListAddString(s) = SendMessage(FbslControl, LB_ADDSTRING, 0, s)
LoadLibrary("riched20.dll")
For i = 0 To 255
hwnds[i] = FbslForm("Form #" & i,,, 535, 400)
FbslControl("Static", hwnds[i], "Label", 100 * (i + 1) + 1, 7, 15, 161, 41, STC_STYLE, STC_EXTSTYLE)
FbslControl("Button", hwnds[i], "Command", 100 * (i + 1) + 2, 183, 15, 161, 41, CMD_STYLE, CMD_EXTSTYLE)
FbslControl("Static", hwnds[i], "Shape", 100 * (i + 1) + 3, 359, 15, 161, 41, SHP_STYLE, SHP_EXTSTYLE)
FbslControl("Button", hwnds[i], "Check", 100 * (i + 1) + 4, 7, 71, 161, 41, CHK_STYLE, CHK_EXTSTYLE)
FbslControl("Button", hwnds[i], "Option", 100 * (i + 1) + 5, 183, 71, 161, 41, OPT_STYLE, OPT_EXTSTYLE)
FbslControl("Button", hwnds[i], "Frame", 100 * (i + 1) + 6, 359, 63, 161, 57, FRM_STYLE, FRM_EXTSTYLE)
FbslControl("ComboBox", hwnds[i], "", 100 * (i + 1) + 7, 7, 127, 169, 21, CMB_STYLE, CMB_EXTSTYLE)
ComboAddString("Some")("combobox")("strings")("added")("for")("your")("enjoyment")
FbslControl("ListBox", hwnds[i], "List", 100 * (i + 1) + 8, 183, 127, 169, 97, LST_STYLE, LST_EXTSTYLE)
ListAddString("Some")("listbox")("strings")("added")("for")("your")("enjoyment")
FbslControl("RichEdit20A", hwnds[i], "RichEdit", 100 * (i + 1) + 9, 359, 127, 161, 97, REC_STYLE, REC_EXTSTYLE)
FbslControl("ScrollBar", hwnds[i], "VScroll", 100 * (i + 1) + 10, 7, 159, 25, 65, VSB_STYLE, VSB_EXTSTYLE)
FbslControl("ScrollBar", hwnds[i], "HScroll", 100 * (i + 1) + 11, 39, 199, 137, 25, HSB_STYLE, HSB_EXTSTYLE)
FbslControl("msctls_trackbar32", hwnds[i], "", 100 * (i + 1) + 12, 7, 239, 169, 33, SLD_STYLE, SLD_EXTSTYLE)
FbslControl("Edit", hwnds[i], "Text", 100 * (i + 1) + 13, 183, 239, 169, 41, TXT_STYLE, TXT_EXTSTYLE)
FbslControl("msctls_progress32", hwnds[i], "", 100 * (i + 1) + 14, 359, 239, 161, 41, PRG_STYLE, PRG_EXTSTYLE)
SendMessage(FbslControl, PBM_SETPOS, 33, 0)
FbslControl("SysDateTimePick32", hwnds[i], "", 100 * (i + 1) + 15, 15, 295, 161, 65, DAT_STYLE, DAT_EXTSTYLE)
FbslControl("msctls_updown32", hwnds[i], "", 100 * (i + 1) + 16, 183, 295, 337, 65, UPD_STYLE, UPD_EXTSTYLE)
FbslControl("Static", hwnds[i], "This area has been intentionally left blank :)", 100 * (i + 1) + 17, 205, 295, 315, 65, STC_STYLE, STC_EXTSTYLE)
Next
For Each elem In hwnds
Show(elem)
DoEvents
Next
Begin Events
If CBMSG = WM_CLOSE Then
ExitProgram(0)
End If
End Events