Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create a com dll in vfp
Message
De
03/03/2006 13:16:58
 
 
À
03/03/2006 12:36:21
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01101265
Message ID:
01101332
Vues:
12
hi,
thank you for reply
1.what that's mean---> (lcYourCode).

2.how i can use it at my form ?

thanks.


>Hi Mohammed!
>
>Does it solve your doubt?
>
>define class testclass as cuistom olepublic
>   name="testclass"
>
>   function testmethod
>      return "it works?"
>   endfunc
>
>   PROCEDURE SetKeyboard(lcKeyboardcode as String)
>      IF VARTYPE(lcKeyboardcode)<>'C'
>         RETURN
>      ENDIF
>      IF EMPTY(lcKeyboardcode)
>         RETURN
>      ENDIF
>      LOCAL pwSzklid
>      pwSzklid = SPACE(8)
>      DECLARE INTEGER GetKeyboardLayoutName IN user32.DLL STRING @
>      geTkeyboardlayoutname(@pwSzklid)
>      DECLARE INTEGER ActivateKeyboardLayout IN user32.DLL INTEGER, INTEGER
>      IF ATC(lcKeyboardcode, pwSzklid)=0
>         acTivatekeyboardlayout(1,0)
>      ENDIF
>      RETURN
>   ENDPROC
>enddefine
>
>
>*- Test
>oCOM = createobject('myfirstcom.testclass')
>? oCom.testmethod()
>? oCom.SetKeyboard(lcYourCode)
>
>
>Good luck!
>
>
>
>>hi all,
>>
>>i need to make code under to com dll,
>>i see at UT ..example, but i have no idea how or (where) i can add the code under .
>
>>define class testclass as cuistom olepublic
>>       name="testclass"
>>       function testmethod
>>       return "it works?"
>>enddefine
>
>
>>oCOM=createobject('myfirstcom.testclass')
>>?ocom.testmethod()
>
>>this code....
>
>>PROCEDURE SetKeyboard
>> LPARAMETER lcKeyboardcode
>> IF VARTYPE(lcKeyboardcode)<>'C'
>>      RETURN
>> ENDIF
>> IF EMPTY(lcKeyboardcode)
>>      RETURN
>> ENDIF
>> LOCAL pwSzklid
>> pwSzklid = SPACE(8)
>> DECLARE INTEGER GetKeyboardLayoutName IN user32.DLL STRING @
>> geTkeyboardlayoutname(@pwSzklid)
>> DECLARE INTEGER ActivateKeyboardLayout IN user32.DLL INTEGER, INTEGER
>> IF ATC(lcKeyboardcode, pwSzklid)=0
>>      acTivatekeyboardlayout(1,0)
>> ENDIF
>> RETURN
>>ENDPROC
>
>>thanks
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform