Question

I am needing to make a disabled and invisible panel enabled and visible when a button is pressed inside a webbrowser. The idea is to force the user to make an input on a complaints/compliments board. When said input is made, the close button (actually a panel so as to not steal focus from the webbrowser. It's a touch screen application) will appear.

The only way I feel i can make it work (with my limited programming knowledge), is to make said button appear when the "write" button is pressed. Knowing the position of the "write" button on the webbrowers relative to the form, if I could use a click event handler, I think i can make it work, but my code isn't working =/

    private void Form1_MouseClick(object sender, MouseEventArgs e)
    {
        Point point = new Point();
        point.X = e.Location.X - Location.X;
        point.Y = e.Location.Y - Location.Y;
        if (point.X <= 724 && point.X>=670 && point.Y <= 367 && point.Y >= 338)
        {
            panel3.Visible = true;
            panel3.Enabled = true;
        }
    }

By using the Mouse move event, it seems as though when the mouse goes over the webbrower, the mouse move or click no longer applies to the event handler (i'm assuming it's because it's no longer on the form but on the web browser).

Please help me out!

Thank you

Was it helpful?

Solution

I was able to use a timer to detect location and when in a certain area, to make enable the panel.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top