[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#

Mappro80 and C#

A forum made available for users of the MapPro OCX SDK to exchange ideas, ask each other questions, etc.

Mappro80 and C#

Postby MarkY » Mon Oct 29, 2012 1:05 pm

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?
The gene pool has no lifeguard...
User avatar
MarkY
Active User
Active User
 
Posts: 28
Joined: Sat Feb 06, 2010 7:31 pm

Re: Mappro80 and C#

Postby LarryWilton » Tue Dec 11, 2012 5:32 pm

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.
User avatar
LarryWilton
Active User
Active User
 
Posts: 26
Joined: Thu Aug 25, 2011 9:23 am

Re: Mappro80 and C#

Postby Gyrotech » Thu Jan 10, 2013 4:59 pm

This has nothing to do with the control. It has to do with your IDE and your system's permissions.
User avatar
Gyrotech
Frequent User
Frequent User
 
Posts: 52
Joined: Mon May 03, 2010 11:23 pm


Return to MapPro OCX

Who is online

Users browsing this forum: No registered users and 3 guests

cron