I think this one wasn't sent to MapInfo-L, and maybe it is of interest to someone else, so here you go
Peter Horsb�ll M�ller GIS Developer Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis -----Original Message----- From: Colin Henderson [mailto:[EMAIL PROTECTED] Sent: Monday, November 15, 2004 7:06 PM To: Peter Horsb�ll M�ller Subject: RE: MI-L Compiling a mapbasic program outside of mapbasic editor Thanks Peter that's exactly the trick I'm after, my app is being developed in VB.NET so I'll look for a managed equivalent of the API - or failing that I'll use the API. Thanks Again! -----Original Message----- From: Peter Horsb�ll M�ller [mailto:[EMAIL PROTECTED] Sent: 15 November 2004 17:50 To: Colin Henderson Subject: RE: MI-L Compiling a mapbasic program outside of mapbasic editor I use use the WinExecute API you can specify the appearence of the window - and this could also be set to Hide: But I think you need to create a application that does this. Here is an example of how to do it using MapBasic, but I don't think that would be the solution to your problem as it would require MapInfo to pop up ;-). But you should able to build a VB, Delphi - or whatever language you perfer - application you can use this API function '**********************************************************************************************'' Define SW_HIDE 0 'Hides the window. Activation passes to another window. Define SW_SHOWNORMAL 1 'Same as SW_RESTORE. Define SW_SHOWMINIMIZED 2 'Minimizes a window and activates it. Define SW_SHOWMAXIMIZED 3 'Maximizes a window and activates it. Define SW_SHOWNOACTIVATE 4 'Displays a window at its most recent size and location. Does not change the active window. Define SW_SHOW 5 'Displays a window at its current size and location, and activates it. Define SW_MINIMIZE 6 'Minimizes the window. Activation passes to another window. Define SW_SHOWMINNOACTIVE 7 'Minimizes a window without changing the active window. Define SW_SHOWNA 8 'Displays a window at its current size and location. Does not change the active window. Define SW_RESTORE 9 'Displays a window at its original size and location and activates it. Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Integer) As Integer '**********************************************************************************************'' Sub APIWinExecute(ByVal szCommand As String, ByVal nWinState As Integer) ' nWinState can be one of the SW_xxx defines, 0 equals HIDE Dim nRc As Integer, szErrorMsg As String OnError GoTo ErrorOccured nRc = WinExec(szCommand, nWinState) if nRc <= 32 then do case nRc case ERROR_OUT_OF_MEMORY szErrorMsg = "Out of memory" case ERROR_FILE_NOT_FOUND szErrorMsg = szCommand & chr$(10) & "file not found" case ERROR_PATH_NOT_FOUND szErrorMsg = szCommand & lf & "path not found" case ERROR_BAD_FORMAT szErrorMsg = "bad format" case else szErrorMsg = "unknown error " & str$(nRc) end case ' note "APIWinExecute: " & szErrorMsg End If Exit Sub '------------------------- ErrorOccured: Note ERR_ERRORMSG & lf & Error$() End Sub Peter Horsb�ll M�ller GIS Developer Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis -----Original Message----- From: Colin Henderson [mailto:[EMAIL PROTECTED] Sent: Monday, November 15, 2004 6:42 PM To: [EMAIL PROTECTED] Subject: MI-L Compiling a mapbasic program outside of mapbasic editor All, I was wondering if anybody knew how to compile a mapbasic program without going through the mapbasic editor. I am aware that you can use mapbasic from a command line using either a -D or -L switch but this fires up the editor, compiles then closes. What I would like to do would be to invoke mapbasic compile without the editor appearing. Is anyone aware of how to do this? The microOLAP mapbasic IDE appears to do this.....how? Regards, -------------------------------------------------------- Colin Henderson Pre and Post Sales Support Ordnance Survey Southampton, SO16 4GU Web: http://www.ordnancesurvey.co.uk Tel: ++44 (0)2380 792034 Mob: ++44 (0)7771 972307 --------------------------------------------------------- This email is only intended for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email which must not be copied, distributed or disclosed to any other person. Unless stated otherwise, the contents of this email are personal to the writer and do not represent the official view of Ordnance Survey. Nor can any contract be formed on Ordnance Survey's behalf via email. We reserve the right to monitor emails and attachments without prior notice. Thank you for your cooperation. Ordnance Survey Romsey Road Southampton SO16 4GU Tel: 023 8079 2000 http://www.ordnancesurvey.co.uk --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14030 This email and any attachments have been virus checked upon receipt at Ordnance Survey and are free of all known viruses. --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14032
