This example demonstrates how to use the BrowserHawk ActiveX component from Visual Basic WebClasses (IIS Applications, introduced in VB 6). In this example we redirect users without frame support to a different page.
Using the BrowserHawk ActiveX component from a Visual Basic WebClass:
1) First, add a reference in your project to your cyscapesvr.dll as follows:
a) Choose References from the Project menu
b) If you do not see BrowserHawk in the list of Available References, click on the Browse button and enter the full path to your cyscapesvr.dll (typically x:\winnt\system32\cyscapesvr.dll). This entry should then appear in the list.
c) Select the check box next to BrowserHawk in the list of Available References and then press OK.
2) Then add the following to a VB 6 IIS Application:
Private Sub WebClass_Start()
Dim bhObj As Object
Set bhObj = Server.CreateObject("cyScape.browserObj")
if bhObj.frames = False then
response.redirect "/noframes_site.asp"
end if
Response.write "<HTML> ... load frameset here ... </HTML>"
End Sub
See Also: