'一个小型计算器的例子
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim exp As String
exp = TextBox1.Text
Dim t As Type = Type.GetTypeFromProgID("MSScriptControl.ScriptControl")
Dim obj As Object = Activator.CreateInstance(t)
t.InvokeMember("Language", System.Reflection.BindingFlags.SetProperty, Nothing, obj, New Object() {"vbscript"})
Dim result As Object = t.InvokeMember("Eval", System.Reflection.BindingFlags.InvokeMethod, Nothing, obj, New Object() {exp})
TextBox2.Text = CStr(result)
End Sub