Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Win2K and FPD25b Open Dialog Box
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00547302
Message ID:
00547699
Vues:
13
>Hi all,
>
>I recently installed Win2K and things are going fine (touchwood) but now one
>thing new is happening is that when ever I try to open a file using the open
>file dialog for eg.:
>
>USE ?
>
>then both the floppy drives are read first (their light come on one by one)
>and only after this that the dialog box shows. This also happens for the
>Filer.
>
>Any suggesstions for configurations.

My experience is that FPD and FPW were built on a D: drive back in Toledo, so the default path is D: for many things. Here's a prg that been around a while which you should run over suspect .exes and .apps etc. It might help. Even use it on things like Genpd.app and other fox utilities that might get included in your programs. (I didn't write the code, but it has worked for us in the past)
* Program fixdrive
* replaces upper drive letters in *.app/*.exe files with "C:"
* Public domain - No copyright on this
PARAMETERS AppFile && the full name of *.app, *.exe
AppHandle = FOPEN(AppFile, 2)
IF AppHandle > 0
  FileLen = FSEEK(AppHandle, 0, 2)
  LastPos = -1
  = FSEEK(AppHandle, 0)
  DO WHILE !FEOF(AppHandle)
    LastPos=Srchfile(AppHandle, LastPos+1, FileLen, ':\')
    IF LastPos > 1 AND UPPER(GetString(AppHandle, LastPos-1, 1)) $ 'DEFGHIJKLMNOPQRSTUVWXYZ'
      =Fseek(AppHandle, LastPos -1)
      =FWRITE(AppHandle, 'c')
    ENDIF
  ENDDO
  =FCLOSE(AppHandle)
ENDIF

*************
PROCEDURE GetString
PARAMETERS FileHandle, fileloc, nbytes
=FSEEK(FileHandle, fileloc)
RETURN FREAD(FileHandle, nbytes)

************
PROCEDURE SrchFile
PARAMETERS FileHandle, FStart, FEnd, String1
***************************************
PRIVATE ALL && Bpos, Fpos, ByteBlock1, ByteBlock2, EndOfFile
Fpos=Fstart
BPos=0
=FSEEK(FileHandle, Fstart)
IF FEOF(FileHandle)
  RETURN -1
ENDIF
EndOfFile = .F.
ByteBlock1 = FREAD(FileHandle, 2048)
EndOfFile  =  LEN(ByteBlock1)=0
ByteBlock2 = FREAD(FileHandle, 2048)
DO WHILE !EndOfFile AND FPos<=FEnd
  Bpos=AT(String1, ByteBlock1+ByteBlock2)
  IF Bpos>0
    =FSEEK(FileHandle, Fpos+Bpos-1)
    RETURN Fpos+Bpos-1
  ENDIF
  Fpos=Fpos+2048
  ByteBlock1 = ByteBlock2
  ByteBlock2 = FREAD(FileHandle, 2048)
  EndOfFile = LEN(ByteBlock2)=0
ENDDO
RETURN -1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform