Hi guys and gals,
I'm having trouble getting the file type specified by the user when
they pick it in the SaveAsDialog, and then don't keep the extension
in the file name. This is only a problem on Windows (Mac OS X forces
a filename extension).
I've tried:
dim f As FolderItem
dim dlg As New SaveAsDialog
dlg.SuggestedFileName = "untitled image.jpg"
#if TargetMacOS then
dlg.Filter = ImageTypesMac.All
#else
dlg.Filter = ImageTypes.All
#endif
f = dlg.ShowModal
if f <> nil then
dim picType As String
dim picTypeArray() As String
if InStr(f.Name, ".") > 0 then
picTypeArray = Split(f.Name, ".")
picType = picTypeArray(UBound(picTypeArray))
end if
// Do stuff based in picType...
end if
but if the user has deleted the extension from the file name this
obviously won't work. How do I get the file type they've picked
without using the file name extension on Windows?
Cheers,
--
Ian M. Jones
___________________________________
http://www.imijsoft.com
http://www.ianmjones.net (blog)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>