The SHBrowseForFolder is not a VB but a Win32 API call. In theory, you
should be able to happily call it from MB. 

However, we do have a snag in that the other listers might be able to shed
some light on: It appears that the call requires the window handle (hWnd) of
the calling application. This is easily obtainable in VB, but as for MB, I
dont know. I'm making enquiries elsewhere, but maybe someone on the list has
an insight?

Chris

-----Original Message-----
From: Søren Breddam [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 9:03 AM
To: MapInfo-L (E-mail)
Cc: 'David Booth'
Subject: Re: MI-L Specifying path


Hi David, Christopher, Jacques, list,

Thanks!
Proposed solutions to let the user specify a save folder:
Converting the VB code from Christopher to MB: I'm in the same situation as
Jacques - I'm not sure it's possible. I haven't found anything like the VB
"SHBrowseForFolder" in MB. As far as I know, everything in MB on this issue
is on file level.

FileSaveAsDlg() and strip the path out: That one could do the trick, and it
was also my initial idea. BUT I can't ask the user to select a file if there
aren't any in the folder (probably a new folder) and I also think it's a
little odd to select a file when I want a folder...

I could create a new folder to the files, but then I still would have to ask
for a drive (the output could be several Gb!) or I could have a button in
the dialog that runs explorer. I don't think these two are better than
letting the user type in the path!

regards 
Søren Breddam
Stevns Kommune

>-----Oprindelig meddelelse-----
>Fra: David Booth [mailto:[EMAIL PROTECTED]]
>Sendt: 7. februar 2001 16:29
>Til: 'Søren Breddam'
>Emne: RE: MI-L Specifying path


>Hi Søren,

>You should be able to fudge something using filesaveasdlg(), which returns
a
>filename (including directory path) without actually saving the file
itself.
>The user browses to the directory they want.

>It should be pretty straightforward to strip out just the path part of the
>returned string and use this to save the pictures - pathtodirectory$()
might
>do it, though I'm not entirely convinced that some of these mapbasic string
>functions work properly.

>Hope this helps. 

>---------------------------------------------
>David Booth
>Senior GIS Officer
>Merseyside Information Service

> -----Original Message-----
> From: Søren Breddam [SMTP:[EMAIL PROTECTED]]
> Sent: 07 February 2001 12:32
> To:   MapInfo-L (E-mail)
> Subject:      MI-L Specifying path
> 
> Hi List,
> I have a loop where I save a lot of windows as picture files.
> Before that I would like to display a dialog where the user shall specify
> the path, where all the files should be saved. How do I do that without
> letting the user type in the path - I would rather let him browse to it?
> 
> regards 
> Søren Breddam
> 
> 
> 
> _______________________________________________________________________
> 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.



_______________________________________________________________________
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.



_______________________________________________________________________
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