I had a similar scenario where I wanted to remind people to use copyright
Info. I actually replaced the "Print" in the menu with my own "print" (using
alter menu) incorporating a message box and then the run menu command (112)
for "print"
You could replace the print statement with code checking for a layout or map
window and then carries on with the print (or exits sub in the case of a map
window)
To enforce the program place the following type of line into a startup.wor
(either in the Windows or MapInfo directory)
Run Application "c:\mapinfo\tools\printreplace.mbx"
I hope this helps
Tim Chinchen (GIS Systems Developer)
I.T. Services Bournemouth Borough Council
Mailto:[EMAIL PROTECTED]
Include "mapbasic.def"
Include "icons.def"
Include "menu.def"
Declare sub MAIN
Declare sub PrintWithCopright
Declare sub ExitWithCopright
Declare sub PrintSetupWithCopright
sub Main
alter menu "File" Remove 111
alter menu "File" Remove 112
alter menu "File" Remove 113
alter menu "file" add "(-"
alter menu "File" add "Page Setup" calling PrintSetupWithCopright
alter menu "File" add "Print" calling PrintWithCopright
alter menu "file" add "(-"
alter menu "File" add "Exit" calling ExitWithCopright
alter ButtonPad "standard" remove M_FILE_PRINT
alter ButtonPad "Standard"
add separator
pushbutton
Icon 41
calling PrintWithCopright
helpmsg "Bournemouth Borough Council - Print (Remember OS ©
Crown Copyright)"
End Sub
Sub PrintWithCopright
Note "Please remember © Copyright"
run menu command 112
End Sub
Sub ExitWithCopright
Run Menu command 113
End Sub
sub PrintSetupWithCopright
Run menu command 111
End Sub
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 23, 2000 12:13 PM
> To: [EMAIL PROTECTED]
> Subject: MI Disbaling the Print facility from the mapper
>
> Hello, Please could someone help me with the following query ?
>
> I have customized MapInfo for use by semi-technical staff and
> would like to disable the print facility from the mapper. All printing
> must be done within the layout window. Could someone recommed
> the MapBasic code needed to ensure the print menu and icon are
> only active within the layout. I have written code that disables
> printing when the front window is the mapper but when you
> changed from the mapper to the layout and back again the print
> facility enables itself.
>
> If anyone knows how I would go about this I would be grateful.
>
> Thanks for your help,
>
>
> David Crowther
> GIS Consultant
> [EMAIL PROTECTED]
> ___________________________
>
> Traffic Director for London
> 0171 222 4545 (ext:143)
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]