Replace OpenDialog and SaveDialog with Shell("fexplore.exe", ?

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Is it possible to pick a file for Open or Save with Shell("fexplore.exe" etc. ?
Or is there another way to pick a file other than OpenDialog and SaveDialog?
I only need to pick up the file path as a variable.

RBS
 

agraham

Expert
Licensed User
Longtime User

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Do you mean you want to select a folder on a path rather than a file?

I want to pick a full path and needs to work on the device. Also I need a variable then to hold that full path.
Doesn't look you can do this with Shell, but maybe there is a way to do this with the API as in GetOpenFileName and GetSaveFileName in the Windows API.
Don't know even if there is an equivalent on the device.

RBS
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User
GetOpenFileName

This suggests that it can be done no problem. No idea though how to access
this API. I suppose you need to make a dll with one of the .net languages?

RBS
 

agraham

Expert
Licensed User
Longtime User
I want to pick a full path and needs to work on the device. Also I need a variable then to hold that full path
Perhaps I'm being thick but I am afraid that I don't understand what you mean. In what way does the following fragment not do what you want?
B4X:
Result = OpenDialog.Show
If Result = cOK then
  FileAndPath = OpenDialog.File
Else
  FileAndPath = ""
End If

GetOpenFileName
As far as I know this shows exactly the same dialog as using OpenDialog in Basic4ppc.

No idea though how to access this API. I suppose you need to make a dll with one of the .net languages?
Yes, that's the only way to do it from Basic4ppc.
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User
I think I just found a very nice and simple solution to this. It is a little utility that replaces (optionally, so you can turn it off) the file open/save dialog on the device with a better one. Slightly tricky to install, but all the information is on this website:

PocketPCFreeware : File Dialog Changer 1.66

Been testing it for a bit now and sofar all great.
Thanks to Hou Ming for making this available.


RBS
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User
but I am afraid that I don't understand what you mean

It is the interface of this dialog I want to change. See first post in this thread.
As posted a few minutes ago, I think I have solved this now.

RBS
 

agraham

Expert
Licensed User
Longtime User
I think I have solved this now.
Good. Quite a few of us use that utility to overcome the limitations of the normal Windows Mobile dialogs.

For the benefit of those who may be wondering why you would want to use this the reason is that the usual open and save dialogs restrict you to the MyDocuments folders and their contents. FileDialogChanger changes these dialogs to unrestricted ones that can access the entire folder structure on the device.
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User
FileDialogChanger changes these dialogs to unrestricted ones that can access the entire folder structure on the device

Yes, that plus the interface is a lot better. You get it just like the desktop interface. Looks like a must-have utility to me.

RBS
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…