public void openImageScreenshot(string imageLocationPath, PictureBox pictureBox)
{
SelectArea area = new SelectArea(this);
area.BringToFront();
area.Activate();
using (Image img = Image.FromFile(imageLocationPath))
{
AspectRatioForm aspectRatioForm = new AspectRatioForm(img);
aspectRatioForm.Show();
}
this.Hide();
area.ShowDialog();
// After showing and hiding the SelectArea form, you can access the file path:
string imagePathScreenshot = area.GetScreenshotFilePath();
pictureBox.ImageLocation = imagePathScreenshot;
this.Show();
}
public void openImageScreenshot(string imageLocationPath, PictureBox pictureBox)
{
SelectArea area = new SelectArea(this);
area.BringToFront();
area.Activate();
using (Image img = Image.FromFile(imageLocationPath))
{
AspectRatioForm aspectRatioForm = new AspectRatioForm(img);
aspectRatioForm.Show();
}
this.Hide();
area.ShowDialog();
// After showing and hiding the SelectArea form, you can access the file path:
string imagePathScreenshot = area.GetScreenshotFilePath();
pictureBox.ImageLocation = imagePathScreenshot;
this.Show();
}