Load the web page

Use local web pages or web URLs:

m_objOverlayHTML.BrowserPageLoad("google.com");

Set the page display parameters: position, size, zoom, etc.

Use the HTML Plugin to configure the page appearance and behavior. For example, you can display just a part of the page and scroll down the content. The display parameters are configured using IMProps interface:

// Set the display area to the right side of the stream m_objOverlayHTML.PropsSet("dst.x", "60%"); m_objOverlayHTML.PropsSet("dst.y", "5%"); m_objOverlayHTML.PropsSet("dst.w", "40%"); m_objOverlayHTML.PropsSet("dst.h", "90%");
// Crop the page from the left and right sides to make it look nicely and focus on a center column of the page m_objOverlayHTML.PropsSet("crop", "50,0,50,0");
// Scroll down the page vertically to display the content outside the display area m_objOverlayHTML.PropsSet("scroll.speed_v", "1");

Control the page with mouse and keyboard actions

Use the page control methods to operate the page just like you would in a browser. As the plugin is displayed on a preview panel, we can monitor the mouse moves and clicks on that panel and pass them to the plugin to use for page control – or just simulate it programmatically.

// Use the eFlags value to specify the button that is pressed now. It can be a shift, alt, etc. // pass the left mouse button press click. mouseEvent.eFlags = eMFEventsFlags.eMFEF_LEFT_MOUSE_BUTTON;
// Pass the mouse click to the plugin // 3-rd parameter here (0) means that the button was pressed down (in opposite to mouse up) // 4-th parameter here (1) means that the clicks count. We pass 1 for a single click m_objOverlayHTML.BrowserMouseClick(mouseEvent, eMFMouseButtons.eMFMB_Left, 0, 1);

You can also simulate keyboard buttons:

// Let's simulate the key press events// For example, the "A" key pressMF_KEY_EVENT keyEvent = new MF_KEY_EVENT();
// We will use the Char event type to simulate a single keystrokekeyEvent.eType = eMFKeyEventType.eMFKT_Char;keyEvent.windows_key_code = (int)Keys.A;m_objOverlayHTML.BrowserKeyEvent(keyEvent)
// We can also pass a key down event// For example the "Alt" keykeyEvent = new MF_KEY_EVENT();
// Here a KeyDown event type is used to simulate a button press downkeyEvent.eType = eMFKeyEventType.eMFKT_KeyDown;keyEvent.windows_key_code = (int)Keys.Alt;m_objOverlayHTML.BrowserKeyEvent(keyEvent);

Use common browser commands: back, forward, reload

Just like in any browser, you can go forward, backwards or reload the page: