How to make a dialog box float?

219 views
Skip to first unread message

ivandgreat

unread,
Nov 28, 2013, 8:30:47 AM11/28/13
to mapi...@googlegroups.com
Good day! I would like to make a dialog box float like the tool named views in mapinfo. Thanks!

Egge-Jan Pollé

unread,
Nov 28, 2013, 9:12:46 AM11/28/13
to mapi...@googlegroups.com
Hi,

I would almost say: please go ahead, be our guest :-)
What is stopping you to do so?

As you will have discovered: it is not possible to create floating dialog boxes using MapBasic.

To use a floating dialog in your application you will need to create a .NET Assembly containing this dialog, and then call it from your MapBasic application.

If you browse to the MapBasic Samples you will find - in the DOTNET folder - the source code for the Named Views tool, both in VB and C#.

HTH,

Egge-Jan


Op donderdag 28 november 2013 14:30:47 UTC+1 schreef ivandgreat:

Peter Horsbøll Møller

unread,
Nov 28, 2013, 9:39:22 AM11/28/13
to mapi...@googlegroups.com
You'll have to create your dialog outside of MapBasic, for instance thru C# or VB.NET.
Then you can call the method in your external application or assembly from MapBasic.

Look in the Samples folder in your MapBasic installation folder: Samples\DOTNET\NAMEDVIEWS

Here you'll find the source code for the Named Views application

Peter Horsbøll Møller
Pitney Bowes Software


> Date: Thu, 28 Nov 2013 05:30:47 -0800
> From: jovann...@gmail.com
> To: mapi...@googlegroups.com
> Subject: [MI-L] How to make a dialog box float?

>
> Good day! I would like to make a dialog box float like the tool named views in mapinfo. Thanks!
>
> --
> --
> You received this message because you are subscribed to the
> Google Groups "MapInfo-L" group.To post a message to this group, send
> email to mapi...@googlegroups.com
> To unsubscribe from this group, go to:
> http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> For more options, information and links to MapInfo resources (searching
> archives, feature requests, to visit our Wiki, visit the Welcome page at
> http://groups.google.com/group/mapinfo-l?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Glen O

unread,
Nov 28, 2013, 7:08:34 PM11/28/13
to mapi...@googlegroups.com
can't be done using vb.net 2008 or 2010 I have tried and PB support could not make it work either
 
i would love to see an working example using a vb.net form or dialog box  not calling a windows lib.
 
you can search the forms i posted the ticket numbers when i tried to complete this 2 yeas ago.

Peter Horsbøll Møller

unread,
Nov 29, 2013, 2:12:53 AM11/29/13
to mapi...@googlegroups.com
Glen

I have always used C# in stead of VB.NET, so my experience with VB.NET is very tiny.

I can see that there are source code NamedViews using VB.NET, too.
Does that not work?

You can find it in the Samples folder:
Samples\DOTNET\NAMEDVIEWS\NamedViewsVB

Peter Horsbøll Møller
Pitney Bowes Software



Date: Thu, 28 Nov 2013 16:08:34 -0800
From: Glen_...@Ossman-CG.net
To: mapi...@googlegroups.com
Subject: Re: [MI-L] How to make a dialog box float?


can't be done using vb.net 2008 or 2010 I have tried and PB support could not make it work either
 
i would love to see an working example using a vb.net form or dialog box  not calling a windows lib.
 
you can search the forms i posted the ticket numbers when i tried to complete this 2 yeas ago.

Glen O

unread,
Nov 29, 2013, 10:11:45 AM11/29/13
to mapi...@googlegroups.com
example will not load in VB.net 2010
 
 Error 3 'InteropServices' is not declared. It may be inaccessible due to its protection level. C:\Program Files (x86)\MapInfo\MapBasic\Samples\DOTNET\NAMEDVIEWS\NamedViewsVB\InteropHelper.vb 18 20 NamedViewsVB
 
workspace generates over 15 errors

Glen O

unread,
Dec 5, 2013, 10:28:41 AM12/5/13
to mapi...@googlegroups.com

yes I know I kid myself but the PB reads this form Serious fix your examples so that they work on a current software release
 
let say Windows 7 vb.net 2010 office 2010
 
that will only make you 3 years behind......  next start planning for 64 bit computer I hear they are coming out soon to ;-)
 
I have not looked at 12 doc's or examples but am betting they have not been updated.
 
 
Reply all
Reply to author
Forward
0 new messages