Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Container-Control on top of webbrowser-control
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01649485
Message ID:
01649504
Views:
71
As others have pointed out because the Web Browser control is an ActiveX container that creates its own top level window that is synched to the application, you can't put anything on top of it.

The best way to deal with this is to create either hide the control when you need to display something on top, or if you want to get real fancy - whenever the control loses focus, capture the window bitmap content and display an image control with the content, then when focus returns back to he control make the control visible again.

FWIW, this is not just a fox problem - I've run into this same issue in .NET with WinForms and WPF where the WebBrowser control also doesn't play nice with other content on the form.

OTOH, I can't imagine many use cases where you'd want to display content on top of hte Web browser control. Another option is to display whatever content you want to display as part of the HTML view by doing an overlay in HTML and JavaScript and displaying that instead.

+++ Rick ---

>Hi there,
>
>I have a form saved as class. Rgis form is used in a POS-App and is displayed on a second screen.
>The form has a container with some labels and a web-browser-control on it. The labels show transactions like article-descritpion and price to the customer.
>The web-browser shall show some advertising in times when there is no activity.
>My problem is, that I can not show the container on top of the browser. Here is what I do on the init:
>
>
>this.obrowser.Top = this.top
>this.obrowser.left = this.left
>this.obrowser.height = this.height
>this.obrowser.width = this.width
>this.obrowser.navigate("www.some-website.de")
>this.obrowser.ZOrder(1)
>this.ct1.ZOrder(0)
>
>
>Can someone tell me what I am doing wrong?
>
>Thanks in advance
>
>Thomas
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform