Re: security setting for web browser control



"Crevit" <a@a> wrote in message
news:eYQn$TfJHHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,

How I can to set security properties for web browser control?

Thanks in advance
Crevit

There doesn't seem to be any security properties... what is it you're trying
to secure?

You can prevent people from going to specific sites easily enough.
'=============
Private Sub Command1_Click()
Call WebBrowser1.Navigate2("http://www.microsoft.com";)
End Sub

Private Sub Form_Load()
Call WebBrowser1.Navigate2("http://www.vbsight.com";)
End Sub

Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, _
URL As Variant, _
Flags As Variant, _
TargetFrameName As Variant, _
PostData As Variant, _
Headers As Variant, _
Cancel As Boolean)
Debug.Print URL

If LCase$(Left$(URL, 25)) = "http://www.microsoft.com/"; Then
Me.Caption = "Can't go there " & Timer
Cancel = True
End If

End Sub
'=============

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm


.



Relevant Pages

  • Restriction
    ... Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, ... Variant, Headers As Variant, Cancel As Boolean) ...
    (microsoft.public.vb.controls.internet)
  • Re: Shared Form - Different Actions for Same Button
    ... Event MyEvent(ByVal L As Long, ByVal D As Double, Cancel As Boolean) ... Private Sub Form_Click ... Print Timer - T, vbCrLf ... ByVal ParamCount As Long, P1 As Variant, P2 As Variant, _ ...
    (microsoft.public.vb.general.discussion)
  • Re: VBA - not working
    ... > Private Sub PercentTB_Exit(ByVal Cancel As MSForms.ReturnBoolean) ... > Dim Min As Variant ...
    (microsoft.public.excel.programming)
  • Re: Maintaining a simple table
    ... Private Sub Form_Error ... Records cannot be inserted if it would create a duplicate name ... Dim X As Variant ... Cancel = 1 ...
    (microsoft.public.access.formscoding)
  • Re: Carets and Forms
    ... First of all I am using MS Internet ... > user must also place the caret in the first box on the form in order to have ... Private Sub Command1_Click ... Private Sub IE_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As ...
    (microsoft.public.vb.winapi)