Hi all,<br><br>I am going to crazy. Yesterday, my windowsForm using a RenderWindowControl worked perfectly. This morning, when i tried to instanciate my renderWindowControl an initialization exception was thrown.<br><br>Here was my code : <br>
<br>System.WindowsFormHost vtkControlHost;<br><br>private void vtkControlHost_Loaded(object sender, RoutedEventArgs e)<br> {<br> <br> // Create the renderWindowControl <br> this.renderWindowControl = new RenderWindowControl();<br>
this.renderWindowControl.Size = new System.Drawing.Size((int)vtkControlHost.Width, (int)vtkControlHost.Height);<br><br> // renderWindowControl Event<br> this.renderWindowControl.Load +=new EventHandler(this.ShowDefaultScene); <br>
vtkControlHost.Child = this.renderWindowControl;<br> }<br><br>public void ShowDefaultScene(object sender, EventArgs e)<br> {<br><br> this.renderWindow = renderWindowControl.RenderWindow;<br>
this.renderer = renderWindowControl.RenderWindow.GetRenderers().GetFirstRenderer();<br> <br> .....<br> }<br>Before, when renderWindowControl became the vtkControlHost Child, the method showDefaultScene() was called. Not today, So i changed this line by<br>
<br>this.renderWindowControl.ParentChanged +=new EventHandler(this.ShowDefaultScene);<br><br>Then, the method was called, but in ShowDefaultScene(), i create some actors ( vtkPolyData, vtkPolyDataMapper, vtkActor) and when i instanciate the first vtk object (vtkPolyData) an initialization exception is thrown again.<br>
I don't understand, I did'nt modify anything, except others files in my global project. However, they don't have some Kitware dll as reference, so...<br><br>Best regards.<br><br>-- <br>Bertrand de Boisdeffre<br>
Etudiant 2A SICOM Phelma Grenoble-INP<br><br>