[vtkusers] Visual Studio .NET -- problem with vtkFormsWindowControl
Ben Held
ben.held at staarinc.com
Thu Sep 18 08:18:24 EDT 2008
Bill,
We had some trouble with this some time ago. Our experience was with a C++
Windows Forms application so I don't know if it is relevant, but if my
memory is correct, it had to do with making sure we were using the same
configuration that the vtkFormsWindow was built with - in our case it was
built for Win32 and we could not use it with a 64-bit version of our
application.
As a result we ended up placing the code for vtkFormsWindow inside our
application and inserting it into our controls programmatically.
Ben
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of William E. Lucarell
Sent: Thursday, September 18, 2008 7:17 AM
To: vtkusers at vtk.org
Subject: Re: [vtkusers] Visual Studio .NET -- problem with
vtkFormsWindowControl
Now I'm getting a System.AccessViolationException meaning memory is corrupt.
If anyone has had this problem or can help me, I'd greatly appreciate it.
Thanks,
Bill
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of William E. Lucarell
Sent: Wednesday, September 17, 2008 1:58 PM
To: vtkusers at vtk.org
Subject: [vtkusers] Visual Studio .NET -- problem with vtkFormsWindowControl
I have been using VTK in Java, and recently we switched to using Visual
C#.NET 2005.
I successfully added a vtkFormsWindowControl to my Windows application. I
have all of the DotNet libraries and the vtkFormsWindow library. However,
when I drag a vtkFormsWindowControl onto the application, I get this error
embedded on the control instead of getting the red cone that I should get:
System.NullReferenceException: Object reference not set to an instance of an
object.
at vtk.vtkFormsWindowControl.OnResize(EventArgs ea) in
c:\dev\out\t2\control\vtkformswindow\vtkformswindowcontrol.cpp:line 297
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width,
Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at vtk.vtkFormsWindowControl.WndProc(Message& m) in
c:\dev\out\t2\control\vtkformswindow\vtkformswindowcontrol.cpp:line 620
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at
System.Windows.Forms.Design.ControlDesigner.DesignerWindowTarget.DefWndProc(
Message& m)
at System.Windows.Forms.Design.ControlDesigner.WndProc(Message& m)
at
System.Windows.Forms.Design.ControlDesigner.DesignerWindowTarget.OnMessage(M
essage& m)
What is causing this error? I'm new to Visual C# .NET.
Bill Lucarell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080918/16660e97/attachment.htm>
More information about the vtkusers
mailing list