Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a c# windows application in which i want to drag 4 pictures from 4 buttons into a picturebox. i can drag and drop pictures into a picturebox but my problem is that they all pile in one location. i want them to be arranged either vertically or horizontally. Below is my picturebox dragdrop event method.

C#
private void picBox_DragDrop(object sender, DragEventArgs e)
{
    PictureBox p1 = (PictureBox)sender;
    Graphics g = p1.CreateGraphics();


    g.DrawImage((Image)e.Data.GetData(DataFormats.Bitmap), new Point(0, 0));



}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900