Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set default to issue
Message
De
04/12/2015 04:27:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01628271
Message ID:
01628476
Vues:
58
>>>You are right about one thing, if I read your message correctly, that getfile() is not stable. In this case of the problem I noticed that getfile() - not always but often - "remembers" where the last time Open Dialog was opened. And the following time it may open in the same location (folder) even when the current folder is different. In the case I am dealing with there are 5 copies of my software installed; the same version of .EXE, the same data structure, just each one is in a different folder. But 2 copies do not seem to have the problem and 2 others have the problem (the resulting 1 I have not tested thoroughly). But in the case of the "problem" copies I noticed that "sticking" of the last folder to the getfile(). If I have time I may even start writing/creating my own getfile(); with VFP it can be done.
>>
>>And then this behavior may change between various versions of windowses. I've noticed that some of the apps that I use (Gimp, LibreOffice, and actually some versions of M$ Office) have their own file dialogs. One reason is to have their own MRU list of locations (per-app MRUs are sorely missing in file dialogs in windowses), another is that there are some options one may want to set when saving (different compression rates etc) and the standard dialogs are not a proper GUI for that.
>
>Thank you, again. I explained to the customer(s) that they should not rely on the getfile() to always open in the same place. They seem to have accepted this ok.

Just found this (in the same old app I'm minding for years - completely forgot this was used until I saw again it this morning) - instead of getfile() you can use common dialog OCX, it's been there in every version of Windows since W95:
	oDlg=CREATEOBJECT("commondialog")
	WITH oDlg.OLECONTROL
		.Filename="  "
		.DEFAULTEXT= "txt"
		.DialogTitle="..."
		.initdir= { here you set the folder where it should start}
		.FLAGS={ bitmapped, dunno, google it}
		.FILTER={Extensions go here}
		.ShowSave()
		lcFile=.Filename    && you get the full path here.
	ENDWITH
Mind you, the dialog may look different in various versions of them windowses, but its PEM set is the same. Perhaps they may have introduced more flags over the years.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform