here is the code:
public Form1()
{
InitializeComponent();
//I already set this in properties - showing here for clarity
webBrowser1.IsWebBrowserContextMenuEnabled = false;
webBrowser1.ContextMenuStrip = contextMenuStrip1;
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (this.Cursor == Cursors.Hand) contextMenuStrip1.Visible = true;
else contextMenuStrip1.Visible = false;
}
I suppose I must create a new event for Cursor...but is not working either. I don't really know how to do it right. Im not expert in making events. I don't understand them fully.
public Form1()
{
InitializeComponent();
CursorChanged += new EventHandler(Form1_CursorChanged);
}
void Form1_CursorChanged(object sender, EventArgs e)
{
if (this.Cursor == Cursors.Hand) contextMenuStrip1.Visible = true;
else contextMenuStrip1.Visible = false;
}

New Topic/Question
Reply




MultiQuote


|