TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
CherRon McLemore
NA
32
0
Drag from listbox and drop in picturebox C#
Jul 8 2010 9:35 AM
I am working on a GUI where I have a listbox and a picturebox. The items in the listbox are image file paths. What I want to do is drag the file path from the listbox into the picturebox. When I run the code, nothing happens. Can someone help? Here is the code:
private void listbox1_MouseDown()
{
string imagePath = (string) this.ListBox1.SelectedItem;
}
private void picBox1_MouseUp()
{
if(e.Button == MouseButtons.Left)
{
picBox1.Load(imagePath);
}
imagePath = "";
}
Reply
Answers (
3
)
Best method to communicate with System.Console from a DLL
c# coding to generate dynamic controls in a windows application