473,398 Members | 2,212 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,398 software developers and data experts.

DragImageBits

Hi All,

I have some problem of understanding and hope that maybe someone here
can help me.

I want to make some Drag&Drop from a File or link towards my program,
want to catch the file information including the file icon and store
the information to show a similar picture. (So you get a list of images
together with the file links).

What I am doing :

Private Sub ListView1_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles ListView1.DragEnter
If
e.Data.GetDataPresent(System.Windows.Forms.DataFor mats.FileDrop) Then
e.Effect = DragDropEffects.Link
Try
Dim m As System.IO.MemoryStream =
e.Data.GetData("DragImageBits", True)
Dim i As Image = Image.FromStream(m)
Catch ex As Exception
Debug.Fail(ex.Message)
End Try
Else
e.Effect = DragDropEffects.None
End If
End Sub

Works fine except for
Dim i As Image = Image.FromStream(m)

Here, draging some link or document into ListView1, I get an exception
because of an system.Argument-Exception at
System.Drawing.Image.FromStream(Stream stream, Boolean
useEmbeddedColorManagement) "Invalid Parameter".

What's wrong here? m is filled and looks good to me, am I missing
soething?
Does anyone has any Idea?

Klaus

Apr 12 '06 #1
1 4224
Any idea? ...

.... ??? Can be that nobody knows?

Anyone knows where to look for or whom to ask?

Klaus

Apr 15 '06 #2

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

Similar topics

4
by: Ken Swanson | last post by:
Hi, In VB.NET, how do I determine what filename has been dropped into a ListView? In my ListView's DragEnter() event, I am trying this, which according to the Help, should work: MyFilename...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.