Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a com dll in vfp
Message
From
03/03/2006 15:29:56
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
 
To
03/03/2006 13:16:58
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01101265
Message ID:
01101382
Views:
9
Hi Mohammed,

You're welcome.
Answers:
1 - lcYourCode is what you will pass how parameter for your method. Your method (procedure) have a parameter "lcKeyboardcode".

2 - Thus:
Local oCom as object
oCom = createobject('myfirstcom.testclass')
oCom.SetKeyboard(lcYourCode)
You can to create a property in the Form instead the variable "oCom".
Good luck!


>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!
Erick
Força Sempre!
Strength Always!
Previous
Reply
Map
View

Click here to load this message in the networking platform