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

Problem with drag and drop from "other" sources

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 picturebox to
picturebox works just fine.

This part of the program is basically that it navigates to a page in a
webbrowser control and on this page there are several pictures to
chose from. I want to drag and drop one of them to a picturebox and
save it as a file for future use.

However, this doesn't work as I want to. When I drag the picture over
my picturebox I get the symbol for dropping but nothing really happens
when I drop it. I figure that there is something different with the
format when taking a picture from a webpage than taking it from
another picturebox.

I have enabled .AllowDrop on my picturebox.

The very simple code without any error and format checking would be
like:
private void pictureBox1_DragEnter(object sender,
DragEventArgs e)
{
e.Effect = DragDropEffects.Copy;
}
private void pictureBox1_DragDrop(object sender, DragEventArgs
e)
{
pictureBox1.Image = (Bitmap)
(e.Data.GetData(DataFormats.Bitmap));
}
If I'm going to do drop operations on pictureboxes I also enable the
dragdropeffects of it like:

private void pictureBox2_MouseMove(object sender,
MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
pictureBox2.DoDragDrop(pictureBox2.Image,
DragDropEffects.All);
}

However, this seems to already be done on the webbrowser control since
I can drag and drop out drom it to internet explorer for example.
Please advice. What am I missing here.

/TJ

Sep 9 '07 #1
0 1699

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

Similar topics

5
by: bughunter | last post by:
Very interesting for me Lock Manager Heap is of size 16809984 bytes Database Heap is of size 9273344 bytes Database Monitor Heap is of size 5226496 bytes Other Memory is of size 729202688...
0
by: vladislav.moltchanov | last post by:
I am developing an Access tool for generating an Application MDB for data entry in a "large scale" project. At design stage I would like to keep open these two MDB. One current is generating forms...
2
by: Bill Cohagan | last post by:
I'm trying out ASP.Net and am currently trying to figure out how to refresh the contents of one frame based on a button click in another frame. The button in question is actually a server side...
0
by: SharpCoderMP | last post by:
the Localization property of the Deployment Project allows to select one of only few languages, that is: Chinese, English, French, German, Italian, Japanese, Korean, Portugal, Russian, Spanish....
12
by: ewarts | last post by:
Hey Guys, I have an access database with a few tables and forms. I was trying to add a new combo box to one of my forms and to do so i needed to add the referenced data to my reference data table....
2
by: Simon | last post by:
Dear reader, Same times a form pops up with the following message "Other user has updated the record" and I can save my update or store it on the clipboard for update later. I am the only...
13
by: Kurda Yon | last post by:
Hi, I found one example which defines the addition of two vectors as a method of a class. It looks like that: class Vector: def __add__(self, other): data = for j in range(len(self.data)):...
0
by: jonceramic | last post by:
Hi All, My apologies for asking something that I'm sure has been answered for. But, my google searching can't find a proper set of keywords. I would like to add "New..." or "other..." or...
10
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this...
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
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
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.