Hello Doug
You can use following kind of code to make save as menu item, and get saved
item name into global variable, save the table and call your own procedure.
Make sure your own procedure is safe, because if you application crashes
the Save As menu item will be removed.
Hope this helps.
Regards,
Anssi
Ps. Create Menu Bar As Default will recover the lost menu item
'***********************************************************************
**************************************
Include "menu.def"
Include "mapbasic.def"
Declare Sub Main
Declare Sub SaveTab
Declare Sub YourProcedure
Global fname As String
Sub Main
Alter Menu Item M_FILE_SAVE_COPY_AS Calling SaveTab
End Sub
Sub SaveTab
Dim i, fSel As SmallInt
Dim fOpen(), tname As String
For i = 1 To NumTables()
ReDim fOpen(i)
fOpen(i) = TableInfo(i,TAB_INFO_NAME)
Next
Dialog
Title "Save table"
Control ListBox Title From Variable fOpen Into fSel
Control OKButton
Control CancelButton
If CommandInfo(CMD_INFO_DLG_OK) Then
fname = TableInfo(fSel,TAB_INFO_TABFILE)
tname = TableInfo(fSel,TAB_INFO_NAME)
fname =
FileSaveAsDlg(PathToDirectory$(fname),PathToTableName$(fname),"TAB","Save
Table")
If fname <> "" Then
Commit Table tname As fname
Call YourProcedure
End If
End If
End Sub
Sub YourProcedure
End Sub
'***********************************************************************
**************************************
-----Alkuper�inen viesti-----
L�hett�j�: Doug Pease [SMTP:[EMAIL PROTECTED]]
L�hetetty: 5. toukokuuta 1999 4:38
Vastaanottaja: '[EMAIL PROTECTED]'
Aihe: MI Using info from File Save dialog
Hi all,
Is there any way to retrieve information entered into a File Save dialog
that is activated in a MapBasic application? I would like to be able to use
the file name, directory and drive name entered into the file save dialog,
later in the same application from which I activate the File Save dialog.
Any ideas greatly appreciated.
Doug Pease
GIS Officer
Livingstone Shire Council
PO Box 600
YEPPOON
Qld 4703
ph: 07 49399229
fax: 07 49393290
email: [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]