473,385 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Drag and Drop Formats in WebBrowser Control/MSHTML

I'm asking this here as I have already asked in the dedicated newsgroups but
with no answer. I wonder if there is an answer that is more generally
applicable to VB.NET.

I want to be able to drag an HTML element onto the WebBrowser control and
drop it where the mouse is. I have looked at two options:

<code>
Dim obj As New DataObject
Dim el As IHTMLElement
Dim s As String

s = " ... some html ... "

el = document.createElement(html)

'' EITHER:

obj.SetData("Text", el.outerHTML)

'' OR
obj.SetData(el)

DoDragDrop(obj, DragDropEffects.Copy)
</code>

In the first case, the object that is dragged contains text. I can retrieve
it as follows

Dim s As String = evt2.dataTransfer.getData("Text")

In the latter case, how can I retrieve the HTML element? Also, how can I
interrogate the data object to find out what format is contained in it?

I prefer the latter case, if it can be made to work, because the html
element may be quite complex.

Thanks.

Charles
Nov 20 '05 #1
3 3829
Cor
Hi Charles,

I have almost the same problem as you. But I am not busy with it now.

You want to drop an element in an underlaying HTML table I asume?

Did you know that in the next version from the framework is planned a totaly
new Webbrowser not a Com.

Are you sure you are not doing now a lot of work, while in future it is a
standard feature.

Just my thought,

Cor
Nov 20 '05 #2
Hi Cor

I am almost certainly doing a lot more work than I need to ;-) This
WebBrowser control is the bane of my life.

I am actually just trying to drop elements onto the browser, but some of
them have nested tags, so it is much more complicated if I drop HTML text
rather than a preformed element.

Where did you here about the new native NET webbrowser control? I would like
to read about it. Do you know when the next version of the framework is due?

Regards

Charles
"Cor" <no*@non.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
Hi Charles,

I have almost the same problem as you. But I am not busy with it now.

You want to drop an element in an underlaying HTML table I asume?

Did you know that in the next version from the framework is planned a totaly new Webbrowser not a Com.

Are you sure you are not doing now a lot of work, while in future it is a
standard feature.

Just my thought,

Cor

Nov 20 '05 #3
Cor
Hi Charles,

I only did find this, very few, but this was the first time I did look at
whidbey.
http://www.mymsevents.com/MyMSEvents...=Search+Now%21

I know probably nothing more about new things than you do, but I saw it
somewhere about webbrowser. Now I did look at the new things from whidbey it
is even possible that someone mixes things up, because it seems that they
start to make the VS.studio design mode for asp.net in a way you can really
use it for a professional desing.

Cor


I am almost certainly doing a lot more work than I need to ;-) This
WebBrowser control is the bane of my life.

I am actually just trying to drop elements onto the browser, but some of
them have nested tags, so it is much more complicated if I drop HTML text
rather than a preformed element.

Where did you here about the new native NET webbrowser control? I would like to read about it. Do you know when the next version of the framework is due?
Regards

Charles
"Cor" <no*@non.com> wrote in message
news:en**************@TK2MSFTNGP12.phx.gbl...
Hi Charles,

I have almost the same problem as you. But I am not busy with it now.

You want to drop an element in an underlaying HTML table I asume?

Did you know that in the next version from the framework is planned a

totaly
new Webbrowser not a Com.

Are you sure you are not doing now a lot of work, while in future it is a standard feature.

Just my thought,

Cor


Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
5
by: Charles Law | last post by:
Sorry for the cross post, but I'm not sure who is best placed to answer this one. This is the most bizarre behaviour of MSHTML and streams. I have a WebBrowser control that contains nothing...
4
by: Dave | last post by:
I need to add the ability to drag from a Windows Form and drop into a non dotNet application. For example, having a generated image in my app that I wish to drag out into explorer as a friendly way...
0
by: Giuseppe | last post by:
Hi I've this problem Inside a winform application I've put a "webbrowser" control I've tried to catch the oncontextmenu event of the loaded HTML document with the following approach 1) In...
3
by: c j anderson, mcp | last post by:
I recently had a need to be able to highlight selected text in a web browser control (working code is posted below). Attempts to access the modified html source through the webbrowser or the...
15
by: Laurent Lequenne | last post by:
Hello All, I'm currently developing a free windows Scrabble (in french :)) application that uses extensively the WebBrowser class of NET 2.0 for configuration, and data browsing. It works 100%...
0
by: supriya51902003 | last post by:
Hi All, Can any one help me regarding this problem-- I have a windows form with a webbrowser control. I want to drag a file from my PC and drop on Webbrowser control. The Webbrowser will...
2
by: M R | last post by:
i am writing an application (C#) that automates the process of loading a web page, login into a site and then simulates the navigation of the site. the program uses a winform with a webBrowser...
0
by: Truevision .Net | last post by:
Hi, I have a problem with drag and drop functionality when it comes to dropping pictures from sources like for example internet explorer and the webbrowser control. Dragging and dropping from...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.