File Open & File Save Questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin

    File Open & File Save Questions

    Again drawing on the groups experience:-

    1. For general file opening and file saving, using VB6, are there any issues
    with using the FileOpen and FileSave Common Dialog Boxes?

    2. Is using the FileOpen and FileSave Common Dialog Boxes the best way to go
    in general?

    3. For Most of my projects I will be using the same types of data input form
    and report output form, as discussed here recently. Also, the files that are
    saved or recalled are all of the same type (text files with extension .job)
    and are, ideally for me, saved in the same directory (App.Path / job). This
    being the case the FileOpen and FileSave Common Dialog Boxes seem to be a
    bit of an over kill?

    a) When file saving; only the "file name", without extension is needed. This
    could be supplied more simply on the data input form as the first part of
    the required data, or is this too crude?

    b) When recalling an existing job I could get away with just the FileListBox
    because I know (or think I know) where the Drive/Directory is. Or is this
    also too crude.

    a) and b) appear very simple to me but don't mimic your conventional Windows
    style application. I would therefore be most grateful for your advice.


    Regards

    Martin Double

    Email: cadoss@btconnec t.com
    Web Site: http://home.btconnect.com/cadoss


  • J French

    #2
    Re: File Open & File Save Questions

    On Tue, 24 Aug 2004 08:40:58 +0000 (UTC), "Martin"
    <cadoss@btconne ct.com> wrote:
    [color=blue]
    >Again drawing on the groups experience:-
    >
    >1. For general file opening and file saving, using VB6, are there any issues
    >with using the FileOpen and FileSave Common Dialog Boxes?
    >
    >2. Is using the FileOpen and FileSave Common Dialog Boxes the best way to go
    >in general?
    >
    >3. For Most of my projects I will be using the same types of data input form
    >and report output form, as discussed here recently. Also, the files that are
    >saved or recalled are all of the same type (text files with extension .job)
    >and are, ideally for me, saved in the same directory (App.Path / job). This
    >being the case the FileOpen and FileSave Common Dialog Boxes seem to be a
    >bit of an over kill?
    >
    >a) When file saving; only the "file name", without extension is needed. This
    >could be supplied more simply on the data input form as the first part of
    >the required data, or is this too crude?
    >
    >b) When recalling an existing job I could get away with just the FileListBox
    >because I know (or think I know) where the Drive/Directory is. Or is this
    >also too crude.
    >
    >a) and b) appear very simple to me but don't mimic your conventional Windows
    >style application. I would therefore be most grateful for your advice.[/color]

    Following through your reasoning, it sounds to me as if you have every
    case for designing your own Save and Load 'Dialogs'

    From what you say, you are not really writing a 'traditional' Windows
    style 'file editor'
    - you are writing a storage mechanism for 'Jobs'

    If you avoid referring to the 'jobs' as Files, then the users need not
    even be aware that you are actually storing files.

    Personally I would not use a FileListbox, better read the file names
    yourself and have your own Listbox
    - that way you can sort by Name or by Date, search by part of the name
    and generally provide a really neat interface.

    You could also keep a little header in each file that stores
    interesting things like: Job Opened by, on etc

    Comment

    • Martin

      #3
      Re: File Open &amp; File Save Questions



      "J French" <erewhon@nowher e.com> wrote in message
      news:412b0567.9 8201648@news.bt click.com...[color=blue]
      > On Tue, 24 Aug 2004 08:40:58 +0000 (UTC), "Martin"
      > <cadoss@btconne ct.com> wrote:
      >[color=green]
      > >Again drawing on the groups experience:-
      > >
      > >1. For general file opening and file saving, using VB6, are there any[/color][/color]
      issues[color=blue][color=green]
      > >with using the FileOpen and FileSave Common Dialog Boxes?
      > >
      > >2. Is using the FileOpen and FileSave Common Dialog Boxes the best way to[/color][/color]
      go[color=blue][color=green]
      > >in general?
      > >
      > >3. For Most of my projects I will be using the same types of data input[/color][/color]
      form[color=blue][color=green]
      > >and report output form, as discussed here recently. Also, the files that[/color][/color]
      are[color=blue][color=green]
      > >saved or recalled are all of the same type (text files with extension[/color][/color]
      ..job)[color=blue][color=green]
      > >and are, ideally for me, saved in the same directory (App.Path / job).[/color][/color]
      This[color=blue][color=green]
      > >being the case the FileOpen and FileSave Common Dialog Boxes seem to be a
      > >bit of an over kill?
      > >
      > >a) When file saving; only the "file name", without extension is needed.[/color][/color]
      This[color=blue][color=green]
      > >could be supplied more simply on the data input form as the first part of
      > >the required data, or is this too crude?
      > >
      > >b) When recalling an existing job I could get away with just the[/color][/color]
      FileListBox[color=blue][color=green]
      > >because I know (or think I know) where the Drive/Directory is. Or is this
      > >also too crude.
      > >
      > >a) and b) appear very simple to me but don't mimic your conventional[/color][/color]
      Windows[color=blue][color=green]
      > >style application. I would therefore be most grateful for your advice.[/color]
      >
      > Following through your reasoning, it sounds to me as if you have every
      > case for designing your own Save and Load 'Dialogs'
      >
      > From what you say, you are not really writing a 'traditional' Windows
      > style 'file editor'
      > - you are writing a storage mechanism for 'Jobs'
      >
      > If you avoid referring to the 'jobs' as Files, then the users need not
      > even be aware that you are actually storing files.
      >
      > Personally I would not use a FileListbox, better read the file names
      > yourself and have your own Listbox
      > - that way you can sort by Name or by Date, search by part of the name
      > and generally provide a really neat interface.
      >
      > You could also keep a little header in each file that stores
      > interesting things like: Job Opened by, on etc[/color]

      Some very interesting and useful points there, many thanks.

      Regards

      Martin Double

      Email: cadoss@btconnec t.com
      Web Site: http://home.btconnect.com/cadoss


      Comment

      • J French

        #4
        Re: File Open &amp; File Save Questions

        On Tue, 24 Aug 2004 11:18:40 +0000 (UTC), "Martin"
        <cadoss@btconne ct.com> wrote:

        <snip>
        [color=blue]
        >Some very interesting and useful points there, many thanks.
        >
        >Regards
        >
        >Martin Double[/color]

        I can see why you were concerned

        However, AFAIK you do not seem to be saving files
        - you are saving some sort of 'record'


        Comment

        • Martin

          #5
          Re: File Open &amp; File Save Questions




          "J French" <erewhon@nowher e.com> wrote in message
          news:412b3eab.1 12864022@news.b tclick.com...[color=blue]
          > On Tue, 24 Aug 2004 11:18:40 +0000 (UTC), "Martin"
          > <cadoss@btconne ct.com> wrote:
          >
          > <snip>
          > However, AFAIK you do not seem to be saving files
          > - you are saving some sort of 'record'
          >[/color]

          Sorry for that, I'm still learning, is this better?


          Comment

          • J French

            #6
            Re: File Open &amp; File Save Questions

            On Tue, 24 Aug 2004 13:55:35 +0000 (UTC), "Martin"
            <cadoss@btconne ct.com> wrote:
            [color=blue]
            >
            >
            >
            >"J French" <erewhon@nowher e.com> wrote in message
            >news:412b3eab. 112864022@news. btclick.com...[color=green]
            >> On Tue, 24 Aug 2004 11:18:40 +0000 (UTC), "Martin"
            >> <cadoss@btconne ct.com> wrote:
            >>
            >> <snip>
            >> However, AFAIK you do not seem to be saving files
            >> - you are saving some sort of 'record'
            >>[/color]
            >
            >Sorry for that, I'm still learning, is this better?[/color]

            It is just the way you think of things
            - or rather, how your users view things

            Comment

            • Steve Gerrard

              #7
              Re: File Open &amp; File Save Questions


              "Martin" <cadoss@btconne ct.com> wrote in message
              news:cgeuuq$el8 $1@titan.btinte rnet.com...
              | Again drawing on the groups experience:-
              |
              | 1. For general file opening and file saving, using VB6, are there any
              issues
              | with using the FileOpen and FileSave Common Dialog Boxes?
              |
              | 2. Is using the FileOpen and FileSave Common Dialog Boxes the best way
              to go
              | in general?
              |
              | 3. For Most of my projects I will be using the same types of data
              input form
              | and report output form, as discussed here recently. Also, the files
              that are
              | saved or recalled are all of the same type (text files with extension
              ..job)
              | and are, ideally for me, saved in the same directory (App.Path / job).
              This
              | being the case the FileOpen and FileSave Common Dialog Boxes seem to
              be a
              | bit of an over kill?
              |
              | a) When file saving; only the "file name", without extension is
              needed. This
              | could be supplied more simply on the data input form as the first part
              of
              | the required data, or is this too crude?
              |
              | b) When recalling an existing job I could get away with just the
              FileListBox
              | because I know (or think I know) where the Drive/Directory is. Or is
              this
              | also too crude.
              |
              | a) and b) appear very simple to me but don't mimic your conventional
              Windows
              | style application. I would therefore be most grateful for your advice.
              |
              |
              | Regards
              |
              | Martin Double
              |
              | Email: cadoss@btconnec t.com
              | Web Site: http://home.btconnect.com/cadoss
              |

              Having read the J. French sequence, I will pipe up with the other point
              of view, just in case it makes sense for your app.

              If the app does use files in the conventional way, I think the common
              dialog is the way to go. It is not the best interface, but users are
              usually used to it. It is useful for things like the standard "file
              exists, do you want to replace it" message, letting users change
              directory for whatever reason they may dream up; clicking on an existing
              file to get the name, then adding an A or a 1 to the end; and so on.

              One way to judge whether you use files in the "convention al" way is
              whether a Most Recently Used file list in your file menu would make
              sense for your app. If so, then I would be looking for file open and
              save dialogs. If not, then you may find something else more suitable.

              I have one app that works the way you and Jerry are discussing, and it
              starts up with a list of projects, with an assortment of data on each
              one, for the user to choose from. I also have another that sticks to the
              conventional dialog interface, with MRUs, and saving the last project
              folder as as setting, etc. So, it really just depends.

              One note: it is possible to use the common dialogs through API calls,
              instead of the extra OCX, if you do decide to go that way.



              Comment

              • Randy Birch

                #8
                Re: File Open &amp; File Save Questions

                I expect Windows applications to utilize Windows common dialogs for common
                tasks. If they don't, they're gone.

                If I'm expected to open a file on XP for instance, I expect to see the File
                Open dialog with the Places bar visible. On older versions I expect to see
                the appropriate common dialog. If someone wants me to select a folder rather
                than a file, I expect to see the Browse for Folders dialog. I say use the
                common controls - either vb or the api versions - so your app looks like a
                Windows app and not something thrown together in turbo pascal or delphi or
                some other non-standard language with their own ideas of what the user
                interface should look like.

                If you want / need the browse dialog, see
                VBnet provides Intermediate and Advanced Win32 API code for VB developers. Comprehensive Code, FAQ, Developers Resources & News, alphabetical API/Type/Constant/Method Index, along with the largest Visual Basic-related links list on the net.


                If you want the common dialog api rather than the common dialog control, see
                VBnet provides Intermediate and Advanced Win32 API code for VB developers. Comprehensive Code, FAQ, Developers Resources & News, alphabetical API/Type/Constant/Method Index, along with the largest Visual Basic-related links list on the net.


                Under no circumstances would I use the file/dir/drive list boxes. These are
                outdated components provided only for backward compatibility and that are
                next to stone-age (circa 1992) in look, feel, and long file name support
                depending on the OS they're used on. The VB help indicates these are
                depreciated controls (that do not exist in vb.net for that matter), and they
                recommend utilizing the common dialogs.

                --

                Randy Birch
                MVP Visual Basic

                Please respond only to the newsgroups so all can benefit.


                "Martin" <cadoss@btconne ct.com> wrote in message
                news:cgeuuq$el8 $1@titan.btinte rnet.com...
                : Again drawing on the groups experience:-
                :
                : 1. For general file opening and file saving, using VB6, are there any
                issues
                : with using the FileOpen and FileSave Common Dialog Boxes?
                :
                : 2. Is using the FileOpen and FileSave Common Dialog Boxes the best way to
                go
                : in general?
                :
                : 3. For Most of my projects I will be using the same types of data input
                form
                : and report output form, as discussed here recently. Also, the files that
                are
                : saved or recalled are all of the same type (text files with extension
                ..job)
                : and are, ideally for me, saved in the same directory (App.Path / job).
                This
                : being the case the FileOpen and FileSave Common Dialog Boxes seem to be a
                : bit of an over kill?
                :
                : a) When file saving; only the "file name", without extension is needed.
                This
                : could be supplied more simply on the data input form as the first part of
                : the required data, or is this too crude?
                :
                : b) When recalling an existing job I could get away with just the
                FileListBox
                : because I know (or think I know) where the Drive/Directory is. Or is this
                : also too crude.
                :
                : a) and b) appear very simple to me but don't mimic your conventional
                Windows
                : style application. I would therefore be most grateful for your advice.
                :
                :
                : Regards
                :
                : Martin Double
                :
                : Email: cadoss@btconnec t.com
                : Web Site: http://home.btconnect.com/cadoss
                :
                :

                Comment

                Working...