Okay, that didn't work... Maybe you'll need to do it in another way:

Function SpecialPageSetup() As Logical

SpecialPageSetup = FALSE

     Dialog
          Title "Page Setup"

          Control Button      Position 10,10  Width 105
               Title "Page setup"
               Calling HandlerMIPageSetup
          Control OKButton         Position 10,25  Width 40
          Control CancelButton     Position 55,25  Width 40
     If not CommandInfo(CMD_INFO_DLG_OK) Then
          Exit Function
     End If

SpecialPageSetup = TRUE

End Function

Sub HandlerMIPageSetup

     Run Menu Command M_FILE_PAGE_SETUP

End Sub

I know that this is not exactly what you had in mind, but at least you give
the user the possibility to abort.

Peter
------------------------------------------------------------------------------------------------
Peter Horsb�ll M�ller, GIS Udviklingskonsulent / GIS-Developer
Kampsax A/S - GIS Software & Solutions
Rugaardsvej 55, 5000 Odense, DK
tel: +45 6313 5013,  dir:+45 6313 5008,  fax: +45 6313 5090
mailto:[EMAIL PROTECTED]
www.kampsax-gis.dk and www.kampsax.dk
Authorized MapInfo Partner & Distributor in Denmark and Norway.
------------------------------------------------------------------------------------------------
Klik ind p� http://www.kortal.dk og se det hele lidt fra oven!

'---------------------------------------------------------------------
Thanks Peter
I tried to use this command but it works only with custom dialog box. in
my
case I call the mapinfo's menu ( run menu command M_FILE_PAGE_SETUP).

Tkanks

'---------------------------------------------------------------------
Try using this command after running the printer setup:

If CommandInfo(CMD_INFO_INTERRUPT) Then
     'User cancelled the dialog
     Exit Sub  '/ Exit Function
End If

If that doesn't work then try this:
If not CommandInfo(CMD_INFO_DLG_OK) Then
     'User cancelled the dialog
     Exit Sub  '/ Exit Function
End If

HTH,

Peter

Manoela wrote:

I work with MapBasic, I have a program that calls the mapinfo's menu
printer, but if the user choose Cancel the process don't stop. How can I
do (in mapbasic) to test if the user coose Cancel or OK butom?




_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to