Flash issue in web browser in winform
I have the strangest problem (but aren't all programming problems odd?). I have a winform that contains a webbrowser object that opens a website that has a flash. This winform works on touch computer (I can't find the brand or model number).
Here's what I know:
- Flash objects embedded in a website accessed via the webbrowser object in my winform does not work as expected
- the flash objects mentioned only react to the first 'click' on them. This way the website opens and if I click a button, that button works, but nothing afterwards works inside the flash object. If my first 'click' misses the button, nothing works after that.
- trying to 'click' the flash button gives the same response as hovering over the button
- This is not a problem with the touch portion of the touchscreen, as using a mouse also gives the same wrong answer.
- This is not a problem with the webpage as I can open File Explorer on the same computer and navigate the webpage easily.
- The program also runs 100% right on my personal computer, so it shouldn't be a program malfunction.
- If it's not a touchscreen bug and not a program bug, I can't really blame anything right now.
- EXACT same program worked 100% on our old touchscreen (which had other issues so we had to get rid of it).
- Oh, also, surfing only a "normal" web page in a web browser in winform works fine.
+1
fgnt
a source
to share
2 answers
I also faced the same problem while developing a Windows app.
Create a custom control like this:
// CREATE A CLASS AND INHERITS TO WEBBROWSER CLASS
public partial class ucWebBrowser : WebBrowser
{
public ucWebBrowser()
{
InitializeComponent();
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case 0x021:
case 0x201:
case 0x204:
case 0x207:
base.DefWndProc(ref m);
return;
}
base.WndProc(ref m);
}
}
You can now see this control in the Toolbox list. Now click and drag this control to your winform instead of the web browser control.
+1
a source to share