Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

puttfile()

Status
Not open for further replies.

kitnba

MIS
Jul 31, 2000
132
HK
In putfile(), I can define what file type to save with the user, but can I disable the file name text box?

I don't want user to mis input the file name, and only want him to choice the different only .

how can I do that ? or others command?

Pls help .

Thanks
 
kitnba

I do not believe you can disable the All Files option with either PUTFILE(), GETFILE() or LOCFILE()

You could errortrap the result with:-

lcFile = GETFILE([DBF],[Browse DBF],[Browse],1,[Browse a DBF])
IF UPPE(JUSTEXT(lcFile)) # [DBF]
[tab]MESSAGEBOX...
ELSE
[tab]* code
ENDIF

Chris
 
Have you tried the GetDir() function? David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
Hi kitnba,

If you use the MS Common Dialog ActiveX control, this is suppose to be an option. Just set the Flags property to cdlOFNFileMustExist (4096). It should display a warning to the user if they input a file that does not exist on disk.

Refer to the CommonDialog control in the VB help or search the MSDN for more info. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
For some VFP oriented documentation on the MS Common Dialog (and other MS ActiveX controls), go to - Doug Hennig's site. Click on Technical Papers, and get "Using Visual FoxPro ActiveX Controls (118K)" - it's got documentation and sample code.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top