Question : MouseDown Event - Allow or Cancel the click

seems like this should be simple - i have a webbrowser control on my C# windows forms app

i assign a mousedown event handler to certain anchor tags each time the page loads ... something like this

myLink.MouseDown += new HtmlElementEventHandler(myLink_MouseDown);

then, in the mousedown event, i want to do a DialogResult that, if "Yes" continues on with the clicking of the link, and if "No", cancels the click of the link...what's the best way to handle this?

      private void myLink_MouseDown(object sender, EventArgs e)
      {
      if(DialogResult.Yes)
      {
            //continue clicking link
      }
      else
      {
            //cancel clicking of link
      }
      }

Answer : MouseDown Event - Allow or Cancel the click

Have a look at: http://dotnetjunkies.com/Article/A72FCFD7-3874-408A-8FCE-541BEC74C704.dcik
Random Solutions  
 
programming4us programming4us