Back

Topic

[KB1059]ActiveX Microsoft Web Browser in PcVue

Tags: ActiveX, Scripting

5 years ago
By DICA
Options
Print
Applies to:

PcVue 7 onwards


Summary:

It is possible to use an ActiveX in order to navigate on a website inside a PcVue mimic. This way it is possible for instance to use WebScheduler inside PcVue or to navigate to any other url. This article explains how to do that using Microsoft Web Browser ActiveX.


Details:

Add Microsoft Web Browser Activex to the favorites menu

  1. Select the command Configure-> Preferences-> ActiveX Controls from the main menu.
    ActiveX Preferences Menu
  2. Select “Microsoft Web Browser” from the left pane. Click the >> command button to copy the names to the right hand pane. Click the OK button

ActiveX controls configuration

 

Inserting the Web Browser ActiveX Control in a Mimic

  1. Open the mimic and switch it to Design mode.
  2. From the menu, select the command Insert ->Favorite ActiveX Controls… -> Microsoft Web Browser.
  3. You should resize it to correctly display the web page
    Insert ActiveX

Create a text to code the following VBA script (on click)

  1. Right click on the text -> View script
    View script
  2. Insert the following code: WebBrowser1.Navigate2 “https://www.google.fr
    Navigate2
  3. Save and return to the main window
    Save and go back to PcVue
    Result in runtime

Warning

We emphasize that the Microsoft Web Browser ActiveX is an external component. In this case, PcVue will be an ActiveX container and will benefit from its functionalities.

For example, if the right click leads to a code and it is not possible by the properties of the object or by VBA code to deactivate it, PcVue will not block it. You have to act on the registry to lock things down (How to lock the Internet Explorer context menu for the Web Browser ActiveX), that will be part of the ActiveX itself.

In addition, what will be taken into account will be the site on which the “Web Browser” will access. If the site in question opens an interface to open a file, PcVue cannot do anything to block it. By analogy, an email site where you can attach files or a photo development site that allows a selection of images. The proposed dialog could potentially allow access to the various files on the system. Therefore, we will be unable to guarantee that everything will be blocked using the Microsoft Web Browser ActiveX in PcVue.

Finally, web sites opened in a web browser ActiveX will not be as optimized as if it was opened in a real web browser (Microsoft WebBrowser ActiveX performances)

 

Created on: 07 May 2020 Last update: 04 Sep 2024