is it posible to customize the getfile() class? 
Author Message
 is it posible to customize the getfile() class?

is it posible to customize the getfile() class?

thanks



Wed, 26 Feb 2003 06:18:06 GMT  
 is it posible to customize the getfile() class?
It's not a class, it's a built in VFP function.  So the answer is no.  But
you can use the Common Dialog Open file selection ActiveX control, that
gives you some more options you can modify.

--
Fred


Quote:
> is it posible to customize the getfile() class?

> thanks



Wed, 26 Feb 2003 05:49:33 GMT  
 is it posible to customize the getfile() class?

I don't think so.  Take a look at the CommonDialog ActiveX control--still
not customizable, but has a lot of settings you can manipulate to perhaps
meet your needs.


Quote:
> is it posible to customize the getfile() class?

> thanks



Wed, 26 Feb 2003 05:39:55 GMT  
 is it posible to customize the getfile() class?
It's not a class, it's a VFP function.
What do you want to do with it?
There are parameters to pass to the function which can customize it some.
See GETFILE() in the help


Quote:
> is it posible to customize the getfile() class?

> thanks



Wed, 26 Feb 2003 05:53:38 GMT  
 is it posible to customize the getfile() class?
Oscar (via Fred)-

Quote:


> > is it posible to customize the getfile() class?

I just did what Fred suggests so have some example code handy <g>.  The
following code is in a click() method of a button.  User's click it to save
the contents of an RTF control to a file.  The common dialog control is used
to select a file.  BTW, I couldn't find any code samples in the VFP
foundation classes or the MSDN for using the Save functionality of the
Common Dialog Control.  So, I used the VB Object Browser to browse the
control and just cut and pasted the constants.

#DEFINE cdlOFNAllowMultiselect 512       && Allows the File Name list box to
have multiple selections.
#DEFINE cdlOFNCreatePrompt 8192          && Asks if the user wants to create
a file that does not currently exist.
#DEFINE cdlOFNExplorer 524288            && Windows 95 Open A File dialog
box template.
#DEFINE cdlOFNExtensionDifferent 1024    && Extension of returned file name
is different from the one set by DefaultExt.
#DEFINE cdlOFNFileMustExist 4096         && User can enter only names of
existing files.
#DEFINE cdlOFNHelpButton 16              && Causes the dialog box to display
the Help button.
#DEFINE cdlOFNHideReadOnly 4             && Hides the Read Only check box.
#DEFINE cdlOFNLongNames 2097152          && Long filenames.
#DEFINE cdlOFNNoChangeDir 8              && Sets the current directory to
what it was when the dialog box was invoked.
#DEFINE cdlOFNNoDereferenceLinks 1048576 && No shortcuts.
#DEFINE cdlOFNNoLongNames 262144         && No long filenames.
#DEFINE cdlOFNNoReadOnlyReturn 32768     && The returned file will not have
the Read Only attribute set.
#DEFINE cdlOFNNoValidate 256             && Allows invalid characters in the
returned file name.
#DEFINE cdlOFNOverwritePrompt 2          && Generates a message box if the
selected file already exists.
#DEFINE cdlOFNPathMustExist 2048         && User can enter only valid path
names.
#DEFINE cdlOFNReadOnly 1                 && Checks Read Only check box for
Open and Save As dialog boxes.
#DEFINE cdlOFNShareAware 16384           && Sharing violation errors will be
ignored.

*!* The Common Dialog Control is set to throw an error if
*!* the user cancels insteads of selects a file.  If this happens,
*!* llOK is set to .F. in the button's Error() Event.
*!*
PRIVATE llOK
llOK = .T.

WITH THISFORM

 .cmctl32.CancelError = .T.

 .cmctl32.Flags = cdlOFNLongNames + ;
      cdlOFNNoChangeDir + ;
      cdlOFNNoReadOnlyReturn + ;
      cdlOFNPathMustExist + ;
      cdlOFNOverwritePrompt

 .cmctl32.ShowSave

 IF llOK .AND. .cmctl32.hDC > 0
  .RTFctl.SaveFile(.cmctl32.FileName, 0 )
 ENDIF

ENDWITH

--

Nancy

Please post replies to the newsgroup
so everybody benefits from the
discussion.

Best viewed with a non-proportional font.



Thu, 27 Feb 2003 10:25:27 GMT  
 is it posible to customize the getfile() class?
Gee, Nancy, you take all the fun out of the way I was taught most things.
"That's an exercise left to the student."  <BG>

--
Fred


Quote:
> Oscar (via Fred)-



> > > is it posible to customize the getfile() class?

> I just did what Fred suggests so have some example code handy <g>.  The
> following code is in a click() method of a button.  User's click it to
save
> the contents of an RTF control to a file.  The common dialog control is
used
> to select a file.  BTW, I couldn't find any code samples in the VFP
> foundation classes or the MSDN for using the Save functionality of the
> Common Dialog Control.  So, I used the VB Object Browser to browse the
> control and just cut and pasted the constants.

> #DEFINE cdlOFNAllowMultiselect 512       && Allows the File Name list box
to
> have multiple selections.
> #DEFINE cdlOFNCreatePrompt 8192          && Asks if the user wants to
create
> a file that does not currently exist.
> #DEFINE cdlOFNExplorer 524288            && Windows 95 Open A File dialog
> box template.
> #DEFINE cdlOFNExtensionDifferent 1024    && Extension of returned file
name
> is different from the one set by DefaultExt.
> #DEFINE cdlOFNFileMustExist 4096         && User can enter only names of
> existing files.
> #DEFINE cdlOFNHelpButton 16              && Causes the dialog box to
display
> the Help button.
> #DEFINE cdlOFNHideReadOnly 4             && Hides the Read Only check box.
> #DEFINE cdlOFNLongNames 2097152          && Long filenames.
> #DEFINE cdlOFNNoChangeDir 8              && Sets the current directory to
> what it was when the dialog box was invoked.
> #DEFINE cdlOFNNoDereferenceLinks 1048576 && No shortcuts.
> #DEFINE cdlOFNNoLongNames 262144         && No long filenames.
> #DEFINE cdlOFNNoReadOnlyReturn 32768     && The returned file will not
have
> the Read Only attribute set.
> #DEFINE cdlOFNNoValidate 256             && Allows invalid characters in
the
> returned file name.
> #DEFINE cdlOFNOverwritePrompt 2          && Generates a message box if the
> selected file already exists.
> #DEFINE cdlOFNPathMustExist 2048         && User can enter only valid path
> names.
> #DEFINE cdlOFNReadOnly 1                 && Checks Read Only check box for
> Open and Save As dialog boxes.
> #DEFINE cdlOFNShareAware 16384           && Sharing violation errors will
be
> ignored.

> *!* The Common Dialog Control is set to throw an error if
> *!* the user cancels insteads of selects a file.  If this happens,
> *!* llOK is set to .F. in the button's Error() Event.
> *!*
> PRIVATE llOK
> llOK = .T.

> WITH THISFORM

>  .cmctl32.CancelError = .T.

>  .cmctl32.Flags = cdlOFNLongNames + ;
>       cdlOFNNoChangeDir + ;
>       cdlOFNNoReadOnlyReturn + ;
>       cdlOFNPathMustExist + ;
>       cdlOFNOverwritePrompt

>  .cmctl32.ShowSave

>  IF llOK .AND. .cmctl32.hDC > 0
>   .RTFctl.SaveFile(.cmctl32.FileName, 0 )
>  ENDIF

> ENDWITH

> --

> Nancy

> Please post replies to the newsgroup
> so everybody benefits from the
> discussion.

> Best viewed with a non-proportional font.



Fri, 28 Feb 2003 14:13:16 GMT  
 is it posible to customize the getfile() class?


Quote:
> Gee, Nancy, you take all the fun out of the way I was taught most things.
> "That's an exercise left to the student."  <BG>

Heh. I believe in teaching to fish instead of giving 'em a fish <g>, but on
this and API stuff, it's way nicer to share, I think. :)

--

Nancy

Please post replies to the newsgroup
so everybody benefits from the
discussion.

Best viewed with a non-proportional font.



Sun, 02 Mar 2003 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. I am unable to change parent class in class browser

2. I am looking form information on being a Class Librarian

3. Managing Classes with Class Browser - I cannot copy a class from one class library to another

4. Foxpro in System Tray - Posible solution needs help

5. Customize Software in FoxPro

6. Need Help For Customize Help In Foxpro for Dos 2.5

7. Help!-->Customized Report Writing in FPW2.5

8. Customizing the window for query results

9. R: Customizing Print Preview toolbar

10. restoring user customized screen and form properties when they restart an app

11. Customizing Print Preview TBR

12. Newbie question: customizing grids

 

 
Powered by phpBB® Forum Software