BasicNoUIObjCode Property |
Gets or sets the source code for the macro/module.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxpublic string Code { get; set; }
Public Property Code As String
Get
Set
public:
virtual property String^ Code {
String^ get () sealed;
void set (String^ value) sealed;
}
Property Value
String
The source code for the macro/module.
Implements
IBasicNoUICode
Remarks
The
Code property is the entire macro/module text, including the header
(properties block and attributes section).
Assigning this property alone does not trigger execution.
You must set the Run property in order to trigger execution.
If you use set Run to True to run the code, the Code property is read-only
until Run returns to False.
When FileTools is True the Code property can
be changed by assigning to the FileName property.
Example
Run a short script that displays a message:
basicIdeCtl1.Code = "Sub Main\r\n" +
"MsgBox \"Hello.\"\r\n" +
"End Sub";
basicIdeCtl1.Run = true;
BasicIdeCtl1.Code = "Sub Main" & vbCrLf & _
"MsgBox ""Hello.""" & vbCrLf & _
"End Sub"
BasicIdeCtl1.Run = True
basicIdeCtl1->Code = L"Sub Main\r\nMsgBox \"Hello.\"\r\nEnd Sub";
basicIdeCtl1->Run = true;
See Also