Windows Develop Bookmark and Share   
 index > Windows Forms Designer > How to add event to web browser control
 

How to add event to web browser control

Hi,

I’ve added a web browser control (Microsoft Web Browser" component dll is "Schdocvw.dll� from a visual studio .net customize toolbox on my winform. The Web Browser control hasn’t got some events which I’m trying to include on my implementation such as DragDrop Event or DragEnter Event.

Could anyone suggest how to add event to Microsoft COM component such as Microsoft Web Browser control or suggest any other solution�
MigrationUser 1  Wednesday, July 02, 2003 4:40 AM
Try this:

** Create a UserControl and ensure it's AllowDrop property is set to True.
** Add your web browser COM component to this control and ensure its AllowDrop property is set to True. And yes, it has one even though it doesn't expose the drop events.
** Add something link a ConsoleWrite or MessageBox to the DragDrop and/or Drag/Enter properties.
** Create a new form and add this new UserControl to that form.
** Ensure the new form's AllowDrop property = True.
** Start your application and drag and drop.

It worked for me and DragEnter every time. Try fiddling with it (that's a professional developer's technique) and you may be on your way.

Good Luck!
MigrationUser 1  Tuesday, August 05, 2003 5:41 PM
Try this:

** Create a UserControl and ensure it's AllowDrop property is set to True.
** Add your web browser COM component to this control and ensure its AllowDrop property is set to True. And yes, it has one even though it doesn't expose the drop events.
** Add something link a ConsoleWrite or MessageBox to the DragDrop and/or Drag/Enter properties.
** Create a new form and add this new UserControl to that form.
** Ensure the new form's AllowDrop property = True.
** Start your application and drag and drop.

It worked for me and DragEnter every time. Try fiddling with it (that's a professional developer's technique) and you may be on your way.

Good Luck!
MigrationUser 1  Tuesday, August 05, 2003 5:41 PM

i also want to do the same, and i did as u wrote but

even then drag drop event will not being triggered , what should i do

plz help

fahadmoon  Saturday, December 10, 2005 9:46 AM
You said to set the AllowDrop property on the browser control, but I don't see it. Can you give more details on how to access it and set it?
ChrisW123  Wednesday, March 04, 2009 12:05 AM

You can use google to search for other answers

Custom Search

More Threads

• Draggin out my app without freezing UI (C++)
• TabControl leaves me wanting more
• BUG - Controls disapear
• Combbox Stop Manual Data Entry
• Embedding flash movies so they work correctly within the web browser control
• Validating Fields
• Borders around ScrollableControl
• Bug in Forms Designer
• Confusion over when <File>.Designer.cs
• Designer serialization doesn't work