Hassan TAZI wrote:
> I used to develop easily integrated mapping applications with VB4. Last month I
> upgrade to VB6 and I was surprised when I realize that the same applications don't >
>work under VB6. They all stopp at the following instruction :
> mapinfo.setcallback = new myCallbackClass
> and the error message says that this propertie can't be set for a private object.
>
> Please, can anyone give me the solution.
> Many thanks in advance.
Hi Hassan,
I had the same trouble when I too moved from VB4 to VB5. Here's what
Technical Support told me;
------------------------------------------------------------------------------
This is due to a change in how projects are handled between version 4 and 5
of VisualBasic. In version 4.0, there was only one type of project, but in
version 5.0, you have several different project types to choose from. The
default is a "Standard EXE." To have a public class and use the Callback
method, though, you need to create an "Activex EXE."
1. Open the project normally.
2. Then, right click on the Project title (in the Project view window) and
go to the project properties.
3. Change the type to "ActiveX EXE."
4. Choose to startup in the Sub Main.
5. Next, click on the Component tab and make sure that the Start mode is
"StandAlone".
6. Add a new module to the project
7. Create a Sub Main as follows:
Sub Main()
frmMainWin.Show
End Sub
8. Right click on the MiResponder class and go to it's Properties.
9. Change the Instancing property to "SingleUse"
You should now be able to run the application in VB 5.0
----------------------------------------------------------------------------------
Hope that helps.
Regards,
Paul Fildes Phone: +44 121 643 6711
Information Technology Unit, Maunsell Ltd, Fax: +44 121 643 1357
Attwood House, 1 Worcester Walk, Email: [EMAIL PROTECTED]
New Street, Birmingham B2 4NX, UK URL: www.maunsell.co.uk
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]