Prev: How to get the current column and line number of a text control
Next: Best way to fix status bar drawing issues
From: Tony Toews on 11 Jun 2010 19:07 On Fri, 11 Jun 2010 22:37:55 +0000 (UTC), "Thorsten Albers" <albersSKIP(a)THISuni-freiburg.de> wrote: >But why App.Path? If a relative path is given, usually it is not relative >to the application directory but to the current directory of the >application (curdir$). Hmm, I'd have to understand the current directory a bit more then. But I don't htink I want or need it. My utility is a drag and drop deploy onto a file server used by Access developer/programmers. The MDB file in questoin will be included in the zip file which will be distributed along with the VB6 exe. So it's quite likely that the flie will be thrown into the same folder along with the VB6 exe and various dev created INI files. Now what is also very likely to happen is that users have read only access to the utilityfolder however they must have read/write/etc permission to the folder which contains this particular file. (Actually an Access MDB and the associated LDB file which Jet/DAO will created and delete as required.) So it is quite likely that the dev/pgmr will need to create another folder, which could be a subfolder, for the users to access the MDB file. Thus my somewhat unusual configuration. Tony
From: Karl E. Peterson on 11 Jun 2010 19:31 Tony Toews wrote : > On Fri, 11 Jun 2010 15:36:00 -0700, Karl E. Peterson <karl(a)exmvps.org> > wrote: > >> To be sure I understand, you want to be sure it's a "valid" filename? >> Not necessarily that it exists? > > Yes, the file must exist. In that case, I'd just test for existence first, then pass it to that PathQualify function I already posted. You could also do something like: If FileExists(FileName) Then FileName = PathQualify(FileName) ElseIf FileExists(PathCombine(App.Path, FileName)) Then FileName = PathQualify(PathCombine(App.Path, FileName)) Else ' Bad juju End If The first test assumes the filespec is relative to the curdir, the second assumes it's relative to the app.path. >> (Requires Win98/2000 or IE4 or higher.) > > Yup, that's fine. Although a few years ago I did get a report of a > bug in A2.0 which dates from 1994 and a few years before that a bug > with NT 4.0. And almost always NT4 got updated to include IE4 or higher before it was frozen in time.
From: Karl E. Peterson on 11 Jun 2010 19:48 Tony Toews wrote : > On Fri, 11 Jun 2010 15:36:00 -0700, Karl E. Peterson <karl(a)exmvps.org> > wrote: > >> To be sure I understand, you want to be sure it's a "valid" filename? >> Not necessarily that it exists? > > Yes, the file must exist. In that case, I'd just test for existence first, then pass it to that PathQualify function I already posted. You could also do something like: If FileExists(FileName) Then FileName = PathQualify(FileName) ElseIf FileExists(PathCombine(App.Path, FileName)) Then FileName = PathQualify(PathCombine(App.Path, FileName)) Else ' Bad juju End If The first test assumes the filespec is relative to the curdir, the second assumes it's relative to the app.path. >> (Requires Win98/2000 or IE4 or higher.) > > Yup, that's fine. Although a few years ago I did get a report of a > bug in A2.0 which dates from 1994 and a few years before that a bug > with NT 4.0. And almost always NT4 got updated to include IE4 or higher before it was frozen in time.
From: Larry Serflaten on 11 Jun 2010 21:06 "Karl E. Peterson" <karl(a)exmvps.org> wrote > You could also do something like: What's with the double posts? I've seen 3 or 4 from you already.... LFS
From: Karl E. Peterson on 11 Jun 2010 21:23 Larry Serflaten explained : > "Karl E. Peterson" <karl(a)exmvps.org> wrote > >> You could also do something like: > > What's with the double posts? I've seen 3 or 4 from you already.... It's the only flaw I've found in my new newsreader. :-( Sometimes, it just seems to get hung up on a post. I dunno if the server's taking too long to acknowledge it, or what. And then, apparently, it sends it again. OE used to do this on occassion, too. Probably about half or a third as often, though.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: How to get the current column and line number of a text control Next: Best way to fix status bar drawing issues |