Venkatesan Dinesh
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am assuming you get a message for each file, with this code
MessageBox::Show(filename) ;
do you get any error?
MessageBox::Show(filename)
do you get any error?
ASKER
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)
And one more query also, after added two image, how i can select each image,(Each picturebox)
ASKER
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::Pi ctureBoxSi zeMode::Zo om;
maxheight = Math::Max(eachPictureBox-> Height,max height);
x = 0;
y += maxheight;
NestingLayout->Controls->A dd(eachPic tureBox);
}
thanks for the effort sir.
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-
eachPictureBox->SizeMode = System::Windows::Forms::Pi
maxheight = Math::Max(eachPictureBox->
x = 0;
y += maxheight;
NestingLayout->Controls->A
}
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...
and my first post, ID: 42191563, shows a kick start fro this request...
ASKER
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
eachPictureBox->Location = Point(0, 0);
eachPictureBox->Image = Image::FromFile(filename);
eachPictureBox->SizeMode = System::Windows::Forms::Pi
eachPictureBox->BringToFro
NestingLayout->Controls->A
}
i need were i went wrong. thanks in advance