smallbasicから、C#をコンパイルします。
自前のエクステンション使います。
サンプル
GraphicsWindow.BackgroundColor = "skyblue"
button = Controls.AddButton("run", 200, 100)
Controls.ButtonClicked = onclick
Sub onclick
C = Text.GetCharacter(34)
R = Text.GetCharacter(13) + Text.GetCharacter(10)
code = ""
code = code + "Function setup(a)" + R
code = code + "csc = " + C + "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" + C + R
code = code + "src = " + C + "D:\hello.cs" + C + R
code = code + "Set obj = CreateObject(" + C + "WScript.Shell" + C + ")" + R
code = code + "Set ex = obj.Exec(csc & " + C + " " + C + " & src)" + R
code = code + "str = " + C + C + R
code = code + "Do" + R
code = code + "str = str & ex.StdOut.ReadAll" + R
code = code + "Loop While ex.Status = 0" + R
code = code + "msgbox str" + R
code = code + "setup = str" + R
code = code + "End Function" + R
a = Class1.VBSrun(code)
EndSub