[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
www.undertowsoftware.com • View topic - Mappro80 and C#
Page 1 of 1

Mappro80 and C#

PostPosted: Mon Oct 29, 2012 1:05 pm
by MarkY
I have been working with a C# project and mappro80 and have hit a problem.

I save a map to a bitmap file using:

axMapPro1.SaveToBitmap("C:\\MyFiles\\MTP_122.bmp");

I then use the file in a picture box,

pictureBox1.Image = Image.FromFile("C:\\MyFiles\\MTP_122.bmp");

It all works fine, until I try to save a new bitmap in the same file,

axMapPro1.SaveToBitmap("C:\\MyFiles\\MTP_122.bmp");

and I get the error message:

Cannot create file "C:\\MyFiles\\MTP_122.bmp". The process
cannot access the file because it is being used by another process

I tried disposing the image, prior to trying to save to it for the second time, i.e.,

pictureBox1.Image.Dispose();
axMapPro1.SaveToBitmap("C:\\MyFiles\\MTP_122.bmp");


but still got the same error message.

Does anyone here have any ideas of what the problem is?

Re: Mappro80 and C#

PostPosted: Tue Dec 11, 2012 5:32 pm
by LarryWilton
That should have worked! I can't see anything wrong with your code, but have you looked at the permissions in the folder where you are saving the file? I am surprised it's not working.

Re: Mappro80 and C#

PostPosted: Thu Jan 10, 2013 4:59 pm
by Gyrotech
This has nothing to do with the control. It has to do with your IDE and your system's permissions.