Some days ago I was creating a Filter Control for our Analysis Reports in the web portal. I was supposed to create a window on the right click of the mouse so it can extract all Cubes and the Hirarechies lists for the purpose of selecting the Filtering Nodes.
The only way out which I thought was to create a Transparent panel as a base for the right click. Following was the way it worked for me.
-
using System;
-
using System.Drawing;
-
using System.Collections;
-
using System.ComponentModel;
-
using System.Windows.Forms;
-
using System.Data;
-
-
namespace WebBrowserAutomation
-
{
-
///
-
/// A transparent control.
-
///
-
public class TransparentPanel : Panel
-
{
-
public TransparentPanel()
-
{
-
}
-
-
protected override CreateParams CreateParams
-
{
-
get
-
{
-
CreateParams createParams = base.CreateParams;
-
createParams.ExStyle |= 0x00000020;
-
return createParams;
-
}
-
}
-
-
protected override void OnPaintBackground(PaintEventArgs e)
-
{
-
// Leave the background unpainted
-
}
-
}
-
}