[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
[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 - Non-visual Inctance
Page 1 of 1

Non-visual Inctance

PostPosted: Fri Aug 12, 2011 11:30 am
by mAlagi
I keep seeing a lot of references to non-visual instance of the OCX, in the documentation and in this forum, but I am new to all this and I was wondering. Why/when would I need to use a non-visual instance, and will that make certain aspects of programming my solution easier? Sorry if these are stupid questions, but I am just making my first steps in using the mappro.

Re: Non-visual Inctance

PostPosted: Mon Aug 15, 2011 11:53 pm
by Kevin_T
If you haven't felt the need for a non-visual implementation, then you probably don't need it. Why complicate life if the way you are using it now meets your needs?

Re: Non-visual Inctance

PostPosted: Thu Aug 18, 2011 8:23 am
by mAlagi
Kevin_T wrote:If you haven't felt the need for a non-visual implementation, then you probably don't need it. Why complicate life if the way you are using it now meets your needs?

I guess in a way you are right, but I don't know when I'm going to need it, so it would be nice to know a little more about it, wouldn't it?

Re: Non-visual Inctance

PostPosted: Tue Sep 13, 2011 8:54 am
by Kevin_T
Yes, it does make sense, if you are going to need it at some point. However, I think you need to ask some more specific questions, if you are going to get any useful answers :-)

To my knowledge, there in no specific documentation for non-visual implementations, but I could be wrong. You may also want to contact undertow directly and see if they have any general information on it.

Re: Non-visual Inctance

PostPosted: Wed Feb 08, 2012 10:41 am
by mAlagi
Kevin_T wrote:Yes, it does make sense, if you are going to need it at some point. However, I think you need to ask some more specific questions, if you are going to get any useful answers :-)

To my knowledge, there in no specific documentation for non-visual implementations, but I could be wrong. You may also want to contact undertow directly and see if they have any general information on it.

O.K., so I'm back :-) You did say come back with specific questions :-) As part of a project I am working on, I want to create a non-visual instance of MapPro80 in C# with no map displayed, I want to use its searching capabilities only and I will manage the search results in my project.

How would I go about getting started to do that?

Thanks.

Re: Non-visual Inctance

PostPosted: Fri Feb 10, 2012 4:16 pm
by Kevin_T
There may be other, more elegant ways of doing it, but here is my simple-minded way ;-)

a. Start a New C# Windows Form Application Project
b. Select View, Solutions Explorer
c. Right-Click on your Project Name and select Add Reference
d. Select COM tab, locate MapPro80.OCX and Double-click on it
e. Select your projects form (usually Form1.cs [Design] tab) and double-click to open Form1.cs code file
f. Double-Click on teh form and 6. Add "using MapPro80;" in the Using section of the code
g. Inside the Form1 class, add the code shown below in Bold/Red. Now MyMap is the name of your instance of MapPro80, when the application is run.


public partial class Form1 : Form
{

//-------Add code to use and Initialize the control---------
public MapPro MyMap;
//- Sample initialization code, all properties can be defined here
public void initializeMp80()
{
Map = new MyMapPro();
// You need to call this to initialize all the control parameters
// for a non-visual instance
MyMap.InitNonVis();
// You could initialize all code here, or call routines to set your
// Datapaths, options, etc.
MyMap.DevCode = "YourDevCode";
MyMap.DevPass = "YourDevPass";
//---------------------------------------------------------
}

public Form1()
{
InitializeComponent();
}


Also, remember that if you are using an non-visual instance of the control, you'll have to paint the map onto your own surface, using DirectDraw(), or DirectView().

Re: Non-visual Inctance

PostPosted: Fri Feb 10, 2012 5:19 pm
by mAlagi
Thank you, thank, thank you.... Kevint. What I was looking for!