BasicNoUIObjHiddenCode Property |
Gets or sets the hidden code text.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxpublic string HiddenCode { get; set; }
Public Property HiddenCode As String
Get
Set
public:
virtual property String^ HiddenCode {
String^ get () sealed;
void set (String^ value) sealed;
}
Property Value
String
The hidden code text.
Implements
IBasicNoUIHiddenCode
Remarks
The string assigned to this property is parsed as a separate module.
Public symbols in
HiddenCode can be accessed by the
RunFile and
RunThis methods.
Useful shared code can also be placed in the HiddenCode.
When the HiddenCode is set it is parsed and its variables are allocated.
In addition if the HiddenCode has a Private Sub Main, the main will be executed.
Initialization code can be placed there.
(Modules can be loaded in advance for all other macros/modules by
placing '#Uses comments in the HiddenCode.)
HiddenCode is not loaded until the the first call to:
This allows
AddExtensionObject
(and
AddExtensionObjectWithEvents)
to be called before the
HiddenCode is parsed.
Calling
RemoveExtensions("") forces the
HiddenCode to be
unloaded.
In that case, it will not be reloaded (parsed) until it is needed by
one of the properties or methods listed above.
Example
WaitForApp can be called from any macro/module:
basicIdeCtl1.HiddenCode = "Sub WaitForApp\r\nStop\r\nEnd Sub";
BasicIdeCtl1.HiddenCode = "Sub WaitForApp" & vbCrLf & _
"Stop" & vbCrLf & _
"End Sub"
basicIdeCtl1->HiddenCode = L"Sub WaitForApp\r\nStop\r\nEnd Sub";
See Also