Hello,
Fbsl is able to create controls on the fly thanks to its API capacity to dialog with and thanks to the rich funds that Windows has, I'll show you how easy it is to embedd a web browser component with Fbsl and thanks to ATL APIs...
Get ready... ?
At first, here's the script :
'$AppType GUI
option explicit
$DLLDeclare ATL.AtlAxWinInit
Dim %hDisplay, $URL
FBSL_SetText(Me, "==FBSL Basic Web Browser==")
ReSize(Me, 0, 0, 600, 500)
Center(Me)
Const hURL = FBSL_Control("Edit", Me, "http://www.fbsl.net", 0, 10, 3, 368, 23, _
WS_Child + WS_Visible + WS_TabStop + ES_AutoHScroll, WS_Ex_ClientEdge)
Const IDB_Go = 1000
FBSL_Control("Button", Me, "Go", IDB_Go, 380, 3, 75, 23, WS_Child + WS_Visible + WS_TabStop, 0)
AtlAxWinInit(0)
hDisplay = FBSL_Control("AtlAxWin", Me, "MSHTML:<HTML></HTML>",_
0, 0, 30, 600, 460, WS_Child + WS_Visible, WS_Ex_ClientEdge)
Show(Me)
RefreshMe()
Begin Events
Select Case CBMsg
Case WM_Size
RefreshMe()
Case WM_Close
ExitProgram(0)
Case WM_Command
If CBCtl = IDB_Go Then EventGo()
End Select
End Events
Sub EventGo()
FBSL_GetText(hURL, URL)
If URL = "" Then Return
If (hDisplay <> 0) Then Destroy(hDisplay)
hDisplay = FBSL_Control("AtlAxWin", Me, URL, 0, 0, 30, 600, 460,_
WS_Child + WS_Visible + WS_VScroll + WS_HScroll, WS_Ex_ClientEdge)
RefreshMe()
End Sub
Sub RefreshMe()
Dim %Lefti, %Topi, %Righti, %Bottomi
GetClientRect( Me, Lefti, Topi, Righti, Bottomi )
ReSize(hDisplay, 10, 30, Righti - 25, Bottomi - 70)
End Sub
And then, here's the result :