Very slow when stop debugging

Jul 22, 2011 at 9:09 AM

Hi, I am new to, and find it very useful and powerful. I am a user, and I downloaded the examples from this website. I change the code into, and it work well. However, when I tried to embed the plot into a picture box, I found it very slow to stop debugging (the degugging not stop automaticly, needed to stop by hand), while this didn't exited for the case of plot using R's plot window(not embed). So could anyone tell me where the problem is? Thanks very much!

The following are the codes:

Private rPlotEngine As RDotNet.REngine

Private cbt As RDotNet.RGraphAppHook

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'Form load

        REngine.SetDllDirectory("C:\Program Files\R\R-2.13.1\bin\i386")


        REngine.CreateInstance("RDotNet", {"-q"})

        rPlotEngine = REngine.GetInstanceFromID("RDotNet")


        cbt = New RGraphAppHook()    '

        cbt.GraphControl = Me.PictureBox1

End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        'embed plot





End Sub


Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

        'form closed

        If rPlotEngine Is Nothing Then



        End If

 End Sub