Hi,
I'm working in a software that has a C# interface and access some C++ code
so each button write some data in text files and run the process and read the result from other files (images)

So what a button do is like that
- Write an image path in file
- write some parameters
- run C++(.exe) process
- read the image path
- read the image
- do some processing
- save new image (in a specified path
- read the new image(from the specified path) and show it

all of these steps are working well
except that when try to show the image (Path Not Found Exception) appeared

{
     System.Diagnostics.Process.Start("Detect.exe");
     showImage("Process/Detected.jpg");
}
public void showImage(string path)
{
     this.pictureBox1.Image = Image.FromFile(path);
     this.textBox5.Text = path;
}

After running the line
System.Diagnostics.Process.Start("Detect.exe");

I check for the new image and it is placed correctly in the specified folder


Another Note :
when I place an image with the name and folder specified in run the application
I find that it works well (but I need to save the image at runtime !)


Thanks,

So what a button do is like that
- Write an image path in file
- write some parameters
- run C++(.exe) process
- read the image path
- read the image
- do some processing
- save new image (in a specified path)
- read the new image(from the specified path) and show it

the red steps are done by the C++ process

The same problem appears in JAVA when working with SWING !!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.