[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

Non-visual Inctance

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

Non-visual Inctance

Postby mAlagi » Fri Aug 12, 2011 11:30 am

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.
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am

Re: Non-visual Inctance

Postby Kevin_T » Mon Aug 15, 2011 11:53 pm

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?
User avatar
Kevin_T
Senior User
Senior User
 
Posts: 265
Joined: Fri Apr 30, 2010 9:13 am

Re: Non-visual Inctance

Postby mAlagi » Thu Aug 18, 2011 8:23 am

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?
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am

Re: Non-visual Inctance

Postby Kevin_T » Tue Sep 13, 2011 8:54 am

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.
User avatar
Kevin_T
Senior User
Senior User
 
Posts: 265
Joined: Fri Apr 30, 2010 9:13 am

Re: Non-visual Inctance

Postby mAlagi » Wed Feb 08, 2012 10:41 am

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.
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am

Re: Non-visual Inctance

Postby Kevin_T » Fri Feb 10, 2012 4:16 pm

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().
User avatar
Kevin_T
Senior User
Senior User
 
Posts: 265
Joined: Fri Apr 30, 2010 9:13 am

Re: Non-visual Inctance

Postby mAlagi » Fri Feb 10, 2012 5:19 pm

Thank you, thank, thank you.... Kevint. What I was looking for!
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am


Return to MapPro OCX

Who is online

Users browsing this forum: No registered users and 1 guest

cron