我们用 OscarVB.execute_script(vb_dialog,vb_script,vb_parameter)
vb_dialog -- type string, vb.net form.
vb_script -- type string, vb.net Sub or Function which you defined and want to call.
vb_parameter -- type string, the parameter of the above Sub or Function.
来执行 VB.NET 的 SUB() 或 FUNCTION().
我们用 rb.Open(ByVal vb_dialog As Form)
vb_dialog -- type form, it is the vb.net form.
来启动 RUBY 和 VB.NET 的衔接.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
rb.Open(Me)
End Sub
复制代码
用 rb.execute_script(ByVal From_dialog As Form, ByVal To_rbscript As String, Optional ByVal To_rbparameter As String = "")
From_dialog -- type Form, it is the vb.net form.
To_rbscript -- type String, this is the ruby script name which you defined and want to call.
To_rbparameter -- type Optional, String, the parameter of the above def which is ruby script.
来执行 RUBY 的 DEF()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End
End Sub
Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave