Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting VB code to VFP
Message
From
13/11/2003 18:16:14
 
 
To
13/11/2003 17:59:20
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00849707
Message ID:
00849713
Views:
27
This message has been marked as a message which has helped to the initial question of the thread.
Hi David,
>
>I'm hoping someone can help me convert this small VB routine to VFP. This routine is out of a readme file for an ActiveX control I'm trying to use, but I am not proficient enough in VB myself to convert. Any help appreciated.
>
>
Procedure RegisterCustomLanguage
parameters Control
* As CodeMaxCtl.ICodeMax I assumed that you got as parameter some object
lang = Control.Language
lang.CaseSensitive = .T.
str = "for" + Chr(10) + "friend" + Chr(10) + "goto"
str = str   + Chr(10) + "if"     + Chr(10) + "inline" + Chr(10) + "int"
str = str   + Chr(10) + "long"   + Chr(10) + "return" + Chr(10) + "short"
str = str   + Chr(10) + "signed" + Chr(10) + "sizeof"
str = str   + Chr(10) + "static" + "while" + Chr$(10) + "xalloc"
str = str   + Chr(10) + "new"    + Chr(10) + "delete"

lang.Keywords = str

str = "::"  + Chr(10) + "."      + Chr(10) + "->"
str = str   + Chr(10) + "++"     + Chr(10) + "--"     + Chr(10) + "*"
str = str   + Chr(10) + "&"      + Chr(10) + "+"      + Chr(10) + "-"
str = str   + Chr(10) + "!"      + Chr(10) + "~"      + Chr(10) + "sizeof"

lang.Style = cmLangStyleProcedural  && <- not declared yet
lang.Operators = str
lang.SingleLineComments = "//"
lang.MultiLineComments1 = "/*"
lang.MultiLineComments2 = "*/"
lang.ScopeKeywords1 = "{"
lang.ScopeKeywords2 = "}"
lang.StringDelims = Chr$(34) + Chr$(10) + "'"
lang.EscapeChar = "\"
lang.TerminatorChar = ";"

globals = control.globals
=globals.RegisterLanguage("MyOwnC++", lang)
Control.Language = "MyOwnC++"
Endproc
HTH

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform