I nearly said "It can't be done". In that there is no "WebBrowser" control in the object palette of the dialog designer. So you can't just whack a WebBrowser object onto a dialog like you can a button.
However, I dreamt up a way you can do it, kind of. It may not be quite what you are looking for, but it's fun.
There's an API function called SetParent. It allows you to change the parent of a window/object given its handle. So what we can do is start IE, get its handle and then change its parent to a dialog object, thus making IE appear inside the dialog.
Here's a little example script that opens IE up, sticks it inside a tab control with some buttons to demonstrate changing the navigation.
Code: Select all
OnEvent>DIALOG_EVENT,Dialog1,10,GoMjtnet
OnEvent>DIALOG_EVENT,Dialog1,20,GoGoogle
OnEvent>DIALOG_EVENT,Dialog1,2,Quit
VBSTART
Dim IE
Sub CreateIE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible=1
End Sub
Sub Nav(URL)
IE.Navigate(URL)
End Sub
VBEND
Dialog>Dialog1
Caption=Dialog1
Width=735
Height=446
Top=301
Left=236
TabBook=msTabBook1,136,-4,577,405,0
Button=Visit mjtnet.com,8,8,111,25,10
Button=Visit Google.com,8,48,109,25,20
Button=Close,8,375,119,25,2
TabPage=Page1
EndTabBook
EndDialog>Dialog1
VBRun>CreateIE
WaitWindowOpen>Windows Internet Explorer
GetWindowHandle>Windows Internet Explorer,hIEWnd
LibFunc>user32,SetParent,r,hIEWnd,DIALOG1.MSTABBOOK1.HANDLE
Let>WIN_USEHANDLE=1
WindowAction>1,hIEWnd
Let>WIN_USEHANDLE=0
Show>Dialog1
Label>ActionLoop
Wait>0.02
GetDialogAction>Dialog1,r
If>r=2,Quit
Goto>ActionLoop
SRT>GoMjtnet
VBEval>IE.Navigate("http://www.mjtnet.com/"),r
ResetDialogAction>Dialog1
END>GoMjtnet
SRT>GoGoogle
VBEval>IE.Navigate("http://www.google.com/"),r
ResetDialogAction>Dialog1
END>GoGoogle
SRT>Quit
Exit>0
END>Quit
Enjoy.