Link to home
Start Free TrialLog in
Avatar of Venkatesan Dinesh
Venkatesan DineshFlag for India

asked on

C# application

how to add images in panel, and do some operations like crop, select image, rotate, etc in c# windows application.
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Venkatesan Dinesh

ASKER

Awesome Mr Huseyin KAHRAMAN.

But I m Adding multiple images using PictureBox Control But What the thing is i cant select each picture box.

even i cant add more than one image.

here is my sample code

for each (String ^file in droppedfiles)
            {
                  String ^filename = file;
                  MessageBox::Show(filename);
                  PictureBox ^eachPictureBox = gcnew PictureBox();
                  eachPictureBox->Size = System::Drawing::Size(1270, 1778);
                  eachPictureBox->Location = Point(0, 0);
                  eachPictureBox->Image = Image::FromFile(filename);
                  eachPictureBox->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
                  eachPictureBox->BringToFront();
                  NestingLayout->Controls->Add(eachPictureBox);
            }

i need were i went wrong. thanks in advance
I am assuming you get a message for each file, with this code

MessageBox::Show(filename);

do you get any error?
MessageBox is working file. if i select two file i get path of both image in each process. now my error is in placing picturebox, point(x,y)

And one more query also, after added two image, how i can select each image,(Each picturebox)
int x = 0;
            int y = 0;
            int maxheight = -1;
            for each (String ^file in droppedfiles)
            {
                  String ^filename = file;
                  Bitmap^ bmp = gcnew Bitmap(filename);
                  PictureBox ^eachPictureBox = gcnew PictureBox();
                  eachPictureBox->Image = Image::FromFile(filename);
                  eachPictureBox->Location = Point(x, y);
                  eachPictureBox->Size = System::Drawing::Size(bmp->Width, bmp->Height);
                  eachPictureBox->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
                  maxheight = Math::Max(eachPictureBox->Height,maxheight);
                        x = 0;
                        y += maxheight;
                  NestingLayout->Controls->Add(eachPictureBox);
            }

thanks for the effort sir.
question is "how to add images in panel, and do some operations like crop, select image, rotate, etc in c# windows application"

and my first post, ID: 42191563, shows a kick start fro this request...