Search  
Friday, May 25, 2012 ..:: Forum ::.. Register  Login
 Forum Minimize
Pentru a putea posta mesaje trebuie să vă înregistraţi.
Notă: Mesajele cu conţinut jignitor sau ilegal (inclusiv cereri de soft piratat) nu sunt acceptate şi vor fi şterse imediat .

Pentru a primi raspunsuri rapide si corecte, scrieti in mesaj ce intentionati sa faceti, ce mesaj de eroare primiti, in ce context si in urma caror actiuni. De asemenea, mentionati versiunea de FoxPro in care lucrati!
Dacă nu specificați versiunea, se consideră VFP 9.0 SP2.

SearchForum Home
  Visual FoxPro  Clase - VCX si PRG  Functie care te...
 Functie care testeaza daca este discheta in unitatea floppy
 
 3/16/2006 8:18:27 PM
User is offlineoviciandrus
762 posts
www.comptech.ro
1st




Functie care testeaza daca este discheta in unitatea floppy
 (N/A)

Am nevoie de o functie care testeaza daca in unitatea de FD se gaseste sau nu o discheta.

Multumesc!

 3/16/2006 8:27:14 PM
User is offlineGrigore Dolghin
3590 posts
www.class-software.eu
1st






Re: Functie care testeaza daca este discheta in unitatea floppy
 (Romania)

http://www.profox.ro/Articole/ObiectulFileSystem/tabid/148/Default.aspx - folosind obiectul filesystem (e un link de download la sfarsit)

In esenta, e vorba despre asta:

oFSO = CREATEOBJECT("Scripting.FileSystemObject")
?
oFSO.FolderExists("A:\")


Grigore Dolghin
Visual FoxPro MVP 2006 - 2010
Class Software
My blog
 3/16/2006 8:37:26 PM
User is offlineoviciandrus
762 posts
www.comptech.ro
1st




Re: Functie care testeaza daca este discheta in unitatea floppy
 (N/A)
Multam fain pentru solutie si promptitudine!
 3/16/2006 9:23:24 PM
User is offlineDAN VASILOIU
39 posts


Re: Functie care testeaza daca este discheta in unitatea floppy
 (Romania)

Am gasit pe net urmatorul cod:

#define SEM_FAILCRITICALERRORS      0x0001
*-- SetErrorMode determines whether the system handles
*-- serious errors or whether the program handles them.
DECLARE INTEGER SetErrorMode in win32api INTEGER
*-- SetErrorMode returns what the flags were last set.
lnOldMode = SetErrorMode(SEM_FAILCRITICALERRORS)
*-- Test the FoxPro DISKSPACE() function.  If you get a -1, then
*-- there is no disk in the drive.
IF DISKSPACE("A:",1) = -1
   MESSAGEBOX("No disk present.", 0)
ENDIF
*-- Restore system error handling settings.
= SetErrorMode(lnOldMode)

 3/16/2006 9:23:28 PM
User is offlineAdrian Vari
138 posts
5th




Re: Functie care testeaza daca este discheta in unitatea floppy
 (Romania)
Poti folosi si functia diskspace("a").
Atentioneaza userul daca nu are disketa in unitate si daca acesta da ESCAPE iti intoarce -1.

Adrian

Adrian Vari
  Visual FoxPro  Clase - VCX si PRG  Functie care te...

Search  Forum Home         

 Google Ads Minimize

    

Copyright 2002-2010 Profox   Terms Of Use  Privacy Statement