Sample usage from Visual Basic

 

This example demonstrates how to use the BrowserHawk ActiveX component from Visual Basic applications. In this example we have a user agent that we wish to create the BrowserHawk object for so we can check the various browser properties.

 

Using the BrowserHawk ActiveX component from Visual Basic:

 

1) First, add a reference in your project to your cyscapesvr.dll as follows:

2) Call the BrowserHawk Initialize Method to create an object based on a specific user agent. For example:

 

Private Sub Command1_Click()

Dim bhObj As Object

Set bhObj = CreateObject("cyScape.browserObj")

'note the use of CreateObject, not Server.CreateObject

useragent = "Mozilla/5.0 (WinNT; I)"

bhObj.Initialize useragent 

End Sub

 

See Also:

Sample usage from Visual Basic WebClasses

Initialize Method