CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2001
    Posts
    38

    Web Browser Control - Help with opening link on another Control in different form

    Hi,

    I have two forms, each one with a web Browser control. I would like to be able to click on a link located on control A on Form1 to open the link on Control B on form2. Is it possible??

    Herick


  2. #2
    Join Date
    May 2001
    Posts
    4

    Re: Web Browser Control - Help with opening link on another Control in different form

    In form1, having control1, say you have webbrowser1,
    In form2, having control1, say you have webbrowser1,

    Insert the following:

    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)
    set pDisp = form2.WebBrowser1.object
    End sub




    That must help.




  3. #3
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: Web Browser Control - Help with opening link on another Control in different form

    Wondering if you actually have to set the Cancel variable to 1 in the Form1 WebBrowser1 control so that it does not load the same page as Form2 WebBrowser1

    -Cool Bizs

    Good Luck,
    -Cool Bizs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured