473,387 Members | 1,844 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,387 software developers and data experts.

Drop listbox item (url) to Internet Explorer

Hi,

i want to drop links I collected in an listbox to an InternetExplorer
instance.

I use currently the following code:

private void listBox1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
DataObject data = new DataObject();
data.SetData(DataFormats.Text, "http://localhost" );
listBox1.DoDragDrop(data, DragDropEffects.All);
}

But this example only runs on Mozilla. Not IE and not Opera. Does anyone
had an example how to do this with that browsers?

I only found a Drag-Example which seems to work with FILEGROUPDESCRIPTOR -
but I don't know how to create such things in C#.

Many Thx
Maik
Nov 16 '05 #1
3 2304
Hi Maik,

I suspect neither IE nor Opera supports drag-drop into the address box
while Mozilla attempts to accept everything (almost to the point of
accepting a bitmap :P).

The common way of using url links is to click on the link which causes the
browser of your choice, or the default one to launch with the specified
link.

Process.Start(url) // opens default browser
Process.Start(operaPath, url); // opens opera

Happy coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2
> I suspect neither IE nor Opera supports drag-drop into the address box
while Mozilla attempts to accept everything (almost to the point of
accepting a bitmap :P).


On Delphi there exists an component suite which supports url dropping (Drag
& Drop Suite).

Therefore I mean it must be any way to create a FILEGROUPDESCRIPTOR record
and FILEDESCRIPTOR also in c#

Greetings
Maik
Nov 16 '05 #3
Maik,

In order to do this, you are probably going to have to call DoDragDrop
yourself. This is no trivial operation, since you are going to have to
import the IDataObject and IDropSource interfaces, as well as the FORMATETC
and STGMEDIUM structures and then call DoDragDrop on your own.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Maik Porkert" <to******@web.de> wrote in message
news:1x*******************************@40tude.net. ..
I suspect neither IE nor Opera supports drag-drop into the address box
while Mozilla attempts to accept everything (almost to the point of
accepting a bitmap :P).
On Delphi there exists an component suite which supports url dropping

(Drag & Drop Suite).

Therefore I mean it must be any way to create a FILEGROUPDESCRIPTOR record
and FILEDESCRIPTOR also in c#

Greetings
Maik

Nov 16 '05 #4

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

Similar topics

3
by: Russell Campbell | last post by:
Posting again, since my first attempt never appeared: In the onClick method of a listbox, I am attempting to retrieve the selectedIndex property. The listbox is set up to allow multiple...
2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
3
by: Ajay Krishnan Thampi | last post by:
I have a slight problem implementing 'drag and drop' from a datagrid to a tree-view. I have pasted my code below. Someone please advice me on what to do...pretty blur right now. ==code== ...
3
by: Reb | last post by:
Hi, I am using drop down menu in my pages. In one of my page,there is a listbox control below the menu. This listbox control is hiding the drop down menu items. How can i make the drop down...
3
by: mkiger | last post by:
Hey Guys. I'm making an asp.net app and I have a question regarding listboxes. I have a list box and I would like some of the items to be bold based on certian criteria. Is this possible? matt
0
by: Yavuz Bogazci | last post by:
Hi, i have build a form with a listbox and the function that he user can drag and drop files from the windows explorer in this listbox. this works for me when i start it on my localmachine. ...
2
by: Dolorous Edd | last post by:
Hi, for a program I'm working on I need to be able to drag multiple files between Windows Explorer and a ListBox, in both directions. Implementing the "drag in" was pretty easy, but I can't find...
1
by: andrew nott | last post by:
Can anyone tell the the recommended way of performing mutiple-item drag-n-drop from a MultiExtended listbox? The problem is the ListBox selection isn't completed in the MouseDown event, when the...
0
by: Mythran | last post by:
I wrote an editor for a web control that allows it to list all controls on a page in a drop down box in the property grid. In the EditValue method, I have the following (not all the code, but most...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.