Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putfile function doesn't work as Microsoft says?
Message
 
 
À
17/08/2009 10:33:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01418461
Message ID:
01418488
Vues:
57
Alternative solution (see message #1417275)
oDlg = Createobject("PutFileEx")
? oDlg.PutFile()

DEFINE CLASS PutFileEx AS form
	Left = 100   && Set Dialog Position by positioning the form
	Top = 100    && Set Dialog Position
	Name = "PutFileEx"
	DoCreate = .T.
	Visible = .F.
	cFileSelected = ""
	lUserCancel = .F.
	
	ADD OBJECT oCDC AS OleControl WITH ;
		OleClass = "MsComDlg.CommonDialog"

	PROCEDURE oCDC.Init
		This.CancelError = .T. 	
	ENDPROC 	

	PROCEDURE Error
		LPARAMETERS nError, cMethod, nLine
		IF nError = 1429
			This.lUserCancel = .T.
		ENDIF
	ENDPROC 

	PROCEDURE PutFile(tnInitColor)
	    thisform.oCDC.DialogTitle = "Test" 
		Thisform.oCDC.ShowSave()
		IF This.lUserCancel
			This.cFileSelected = ""
		ELSE	
			This.cFileSelected = Thisform.oCDC.FileName
		ENDIF
		RETURN This.cFileSelected 				
	ENDPROC 	
ENDDEFINE
>Hi friends:
>
>I have to create two text files and when I finish I save them in a specific folder.
>
>That's not a problem.
>
>Now I have to let user save them where he wishes with the name he desires
>
>That's is not the problem.
>
>The problem is I want him to know what is saving
>
>I use a file name he can change and I'd like to show a title "Save first file as...", "Save second file as..."
>
>VFP help says:
>
>PUTFILE([cCustomText] [, cFileName] [, cFileExtensions])
>
>CfileName works.
>
>CfileExtensions works.
>
>I need "cCustom Text" works!!!!
>
>There are two reasons:
>
>One: it has to work...
>
>Two: "Save as..." (default title) is not what I want to appear.
>
>"Guardar primer archivo como..." (Spanish, not English)
>
>Does anyone knows any tip or reason for this?
>
>Thank you.
>
> Héctor
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform