M
Michael Groeger
Hi,
I am trying to create a control which adds rounded borders to the WebBrowser
Control. The content of the WebBrowser control should be visible inside of
the round borders, outside of the borders the background should be white.
I tried to achieve this on several ways:
- subclass WebBrowser control:
Add a round border in OnPaint. Draw white background in OnPaint outside of
the round border.
=> Does not work, WebBrowser control always overpaints its contents over
everything the inherited control paints itself.
- overlay WebBrowser control:
Add an instance to the form. Create a Control with round borders, which
supports transparency inside of the border and draws a white background
outside of the border. Add an instance of this control to the form with the
same size and position as the WebBrowser control's instance. Ensure that it
is on-top of the WebBrowser control's instance.
=> Does not work. The WebBrowser control seems to draw its content directly
"on screen" and not into the control.
Does somebody have an idea how to solve this?
Regards,
Michael
I am trying to create a control which adds rounded borders to the WebBrowser
Control. The content of the WebBrowser control should be visible inside of
the round borders, outside of the borders the background should be white.
I tried to achieve this on several ways:
- subclass WebBrowser control:
Add a round border in OnPaint. Draw white background in OnPaint outside of
the round border.
=> Does not work, WebBrowser control always overpaints its contents over
everything the inherited control paints itself.
- overlay WebBrowser control:
Add an instance to the form. Create a Control with round borders, which
supports transparency inside of the border and draws a white background
outside of the border. Add an instance of this control to the form with the
same size and position as the WebBrowser control's instance. Ensure that it
is on-top of the WebBrowser control's instance.
=> Does not work. The WebBrowser control seems to draw its content directly
"on screen" and not into the control.
Does somebody have an idea how to solve this?
Regards,
Michael