1

Konu: 'Excel' yüklü olup olmadığını nasıl anlayabiliriz

error trap metodu dışında; bir bilgisayarda örneğin 'Excel' yüklü olup olmadığını nasıl anlayabiliriz?
Eğer yüklü ise versionu hakkında bilgi nasıl alabiliriz ?
şimdiden teşekkürler
Ali VFP 6.0 SP4

VFP9 SP2

2

Re: 'Excel' yüklü olup olmadığını nasıl anlayabiliriz

class tan alıntıdır.

Kaynak : Cetin BASOZ


* kontrol kodu

Visual Fox Pro
1

2
3
4
5
6
7
8
9
do case

&&case _IsClassRegistered('Word.Application')
&&messagebox('Word 97 veya sonrasi yuklu')
case this._IsClassRegistered('Excel.Application')
RETURN &&messagebox('Excel yuklu')
otherwise
messagebox('MSExcel Sistemde Yüklü Değil !',16,'Hata ...')
   quit
endcase

* class method kodu

Visual Fox Pro
1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
lparameters tcClass

#DEFINE HKEY_CLASSES_ROOT    -2147483648
#DEFINE ERROR_SUCCESS       0   && OK
 
DECLARE Integer RegOpenKey IN Win32API ;
    Integer nHKey, String @cSubKey, Integer @nResult
 
DECLARE Integer RegCloseKey IN Win32API ;
    Integer nHKey
 
local lnKey
lnKey = 0
llRetVal = ( RegOpenKey(HKEY_CLASSES_ROOT, tcClass, @lnKey) = ERROR_SUCCESS )
if llRetVal
  RegCloseKey(lnKey)
endif
CLEAR DLLS
return llRetVal
http://www.soykansoft.com/images/twitter.jpghttp://www.soykansoft.com/images/wp.jpghttp://www.soykansoft.com/images/blogger.jpg

3

Re: 'Excel' yüklü olup olmadığını nasıl anlayabiliriz

oExcel.Version

ile de version alabilirsin.

Yen yaz 1907'ye yolla FB gelsin evinde yensin.
(sonra salaklar ciksin alin terine şike desin)