MapWindow 4 - ActiveX Control Programming : MapWindow Discussion Forum
I am a new bee in this and stuck at the very beginning. Getting started with "MapWindow GIS ActiveX Control" pdf document [http://www.mapwindow.org/tutorials/MapWinGISActiveX%20DevelopmentTutorial.pdf] which is very simple to follow, have made my first win-ap
Stuck at the very begining
Posted by:
sushobhan ()
Date: April 14, 2011 11:37PM
I am a new bee in this and stuck at the very beginning. Getting started with "MapWindow GIS ActiveX Control" pdf document
[http://www.mapwindow.org/tutorials/MapWinGISActiveX%20DevelopmentTutorial.pdf]
which is very simple to follow, have made my first win-application but when try to run my application it gives a error message
"An error occurred creating the form. See Exception.InnerException for details. The error is: Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown."
I'm using MapWindow 4.8.2 and Visual Studio 2008 for this.
Please help
[http://www.mapwindow.org/tutorials/MapWinGISActiveX%20DevelopmentTutorial.pdf]
which is very simple to follow, have made my first win-application but when try to run my application it gives a error message
"An error occurred creating the form. See Exception.InnerException for details. The error is: Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown."
I'm using MapWindow 4.8.2 and Visual Studio 2008 for this.
Please help
Re: Stuck at the very begining
Posted by:
pmeems ()
Date: April 15, 2011 12:59AM
I'll get back to you on this next week.
I've got a presentation on Monday about MapWindow for the UN, so I'm lacking time right now ;)
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
I've got a presentation on Monday about MapWindow for the UN, so I'm lacking time right now ;)
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: Stuck at the very begining
Posted by:
sushobhan ()
Date: April 15, 2011 03:44AM
Thank you very much...mean while I will try my level best to find some solution
Re: Stuck at the very begining
Posted by:
sushobhan ()
Date: April 18, 2011 11:50PM
Hey I'm still stuck in here... plz HELP
Re: Stuck at the very begining
Posted by:
fskrotzki ()
Date: April 19, 2011 08:57AM
Ok so that you know you have not given enough details to directly answer your question. What operating system are you using XP, Vista, Windows 7, Server 2003, 2008? 32 bit or 64 bit. Are you attempting to build a 32 bit app or 64 bit app?Each selection has a slightly different impact on answering your question.
For a reference to the documentation if I remember correctly it was sritten in 2006. At that time that set of direction was written for a 32 bit OS, using Visual Studio 2003/2005 and MapWindow 4.7.x.
So first off try and match the setup a bit closer. Download the 4.7.5 32 bit Stable version from: [www.mapwindow.org] and start there. (I know it works using 4.7.5 as that is where I started to learn using MapWindow).
I know there are some slightly changes if you use a different version and/or newer version of Visual Studio. For those changes search the forums for other posting that had the problem.
If you are attempting to do this with the 64 bit versions of the software there are several special steps you need to do to get the OCX working correctly. Those are covered in the forum if you search for 64 bit OCX.
For a reference to the documentation if I remember correctly it was sritten in 2006. At that time that set of direction was written for a 32 bit OS, using Visual Studio 2003/2005 and MapWindow 4.7.x.
So first off try and match the setup a bit closer. Download the 4.7.5 32 bit Stable version from: [www.mapwindow.org] and start there. (I know it works using 4.7.5 as that is where I started to learn using MapWindow).
I know there are some slightly changes if you use a different version and/or newer version of Visual Studio. For those changes search the forums for other posting that had the problem.
If you are attempting to do this with the 64 bit versions of the software there are several special steps you need to do to get the OCX working correctly. Those are covered in the forum if you search for 64 bit OCX.
Re: Stuck at the very begining
Posted by:
sushobhan ()
Date: April 20, 2011 03:08AM
I'm using visual studio 2008 professional, having 64-bit windows 7 Ultimate Edition.I tried OCX both the 32 bit and 64 bit.
Initially I tried 32-bit version from the notion that all 32-bit application can be installed on 64-bit machine(I may be wrong). When I stuck there I uninstall that and try to use 64-bit ocx by registering it from command prompt (using Regsvr32). It said "Successfully registered".
But within Visual studio when i tried to add the com object to my toolbox it said "Self Registration Failed"
Initially I tried 32-bit version from the notion that all 32-bit application can be installed on 64-bit machine(I may be wrong). When I stuck there I uninstall that and try to use 64-bit ocx by registering it from command prompt (using Regsvr32). It said "Successfully registered".
But within Visual studio when i tried to add the com object to my toolbox it said "Self Registration Failed"
Re: Stuck at the very begining
Posted by:
sushobhan ()
Date: April 25, 2011 08:03AM
Guys Can I expect any help... or should I start trying other ways around...I thought I can easily get some assistance regarding this as this is about the getting started tutorial but my bad luck... never mind :(
Re: Stuck at the very begining
Posted by:
pmeems ()
Date: April 25, 2011 12:27PM
First let me explain something about the 32-bit vs 64-bit ocx.
You can register both on a 64-Bit Windows pc, but you can only use the 32-Bit ocx in Vis. Studio because Vis. Studio is 32-Bit only.
You can however add the 32-bit version to the toolbox, drop it on your form and compile it for 64-Bit.
If you then ship the 64-Bit version of the ocx with your program it will use that version.
It is a bit complicated but that how Vis. Studio works, even with the latest version.
Can you try the above and let us know if that is solving your issues?
BTW. What are you trying to do? Do you need to create a custom application or can you do your task creating a plug-in as well. I would recommend creating a plug-in so you can focus on your own task and let MapWindow take care of the rest.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
You can register both on a 64-Bit Windows pc, but you can only use the 32-Bit ocx in Vis. Studio because Vis. Studio is 32-Bit only.
You can however add the 32-bit version to the toolbox, drop it on your form and compile it for 64-Bit.
If you then ship the 64-Bit version of the ocx with your program it will use that version.
It is a bit complicated but that how Vis. Studio works, even with the latest version.
Can you try the above and let us know if that is solving your issues?
BTW. What are you trying to do? Do you need to create a custom application or can you do your task creating a plug-in as well. I would recommend creating a plug-in so you can focus on your own task and let MapWindow take care of the rest.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: Stuck at the very begining
Posted by:
sushobhan ()
Date: April 26, 2011 03:02AM
Sir, at first i used 32 bit .ocx and try to add it in the toolbar (visual studio prof 2008). For the first time it was successfully added and at the run time I get an exception
"An error occurred creating the form. See Exception.InnerException for details. The error is: Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown."
after that I tried the same procedure for more than one time and from next time onwards it start giving message "Self Registration failed" during adding the .cox to toolbar.
As I didn't get any clue why it happen, I go for the 64 bit (after uninstalling the 32 bit version) and it obviously didn't work too. Now as you explained its the limitation of visual studio that it can't take 64bit ocx.
At this time my goal is to publish my spatial data(shape file) on website with zoom, pan etc facility. Query on attributes also I've planned for.Lets see what my capabilities are. Hope for the best :)
"An error occurred creating the form. See Exception.InnerException for details. The error is: Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown."
after that I tried the same procedure for more than one time and from next time onwards it start giving message "Self Registration failed" during adding the .cox to toolbar.
As I didn't get any clue why it happen, I go for the 64 bit (after uninstalling the 32 bit version) and it obviously didn't work too. Now as you explained its the limitation of visual studio that it can't take 64bit ocx.
At this time my goal is to publish my spatial data(shape file) on website with zoom, pan etc facility. Query on attributes also I've planned for.Lets see what my capabilities are. Hope for the best :)
Re: Stuck at the very begining
Posted by:
pmeems ()
Date: April 26, 2011 08:47AM
Did you install the latest version of MapWindow? Then you know you have all the necessary files. We're still working on creating an 'OCX-only installer'.
If you can open your shapefile in MapWindow you know the OCX is installed and registered correctly.
I do recommend looking at the plug-in architecture. That way you can reuse the zoom and pan capabilities of the desktop version as well as the attribute editor.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
If you can open your shapefile in MapWindow you know the OCX is installed and registered correctly.
I do recommend looking at the plug-in architecture. That way you can reuse the zoom and pan capabilities of the desktop version as well as the attribute editor.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: Stuck at the very begining
Posted by:
chochowy ()
Date: July 19, 2012 01:18PM
I have same problem but I change from Radio Button to Button.it works :)
but this's solution maybe not to solve your problem.
but this's solution maybe not to solve your problem.
Sorry, only registered users may post in this forum.


