<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='color:#1F497D'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>Thanks,<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>Bill<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
vtkusers-bounces@vtk.org [mailto:vtkusers-bounces@vtk.org] <b>On Behalf Of </b>William
E. Lucarell<br>
<b>Sent:</b> Wednesday, September 17, 2008 1:58 PM<br>
<b>To:</b> vtkusers@vtk.org<br>
<b>Subject:</b> [vtkusers] Visual Studio .NET -- problem with
vtkFormsWindowControl<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have been using VTK in Java, and recently we switched to
using Visual C#.NET 2005.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>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:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>System.NullReferenceException:
Object reference not set to an instance of an object.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
vtk.vtkFormsWindowControl.OnResize(EventArgs ea) in
c:\dev\out\t2\control\vtkformswindow\vtkformswindowcontrol.cpp:line 297<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at System.Windows.Forms.Control.OnSizeChanged(EventArgs
e) <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32
height, Int32 clientWidth, Int32 clientHeight)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Control.UpdateBounds()<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Control.WmWindowPosChanged(Message& m)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Control.WndProc(Message& m)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
vtk.vtkFormsWindowControl.WndProc(Message& m) in
c:\dev\out\t2\control\vtkformswindow\vtkformswindowcontrol.cpp:line 620<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Design.ControlDesigner.DesignerWindowTarget.DefWndProc(Message&
m) <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Design.ControlDesigner.WndProc(Message& m)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'>at
System.Windows.Forms.Design.ControlDesigner.DesignerWindowTarget.OnMessage(Message&
m)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Courier New"'><o:p> </o:p></span></p>
<p class=MsoNormal>What is causing this error? I’m new to Visual C# .NET.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b><i><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#00337F'>Bill Lucarell</span></i></b><span style='font-size:8.0pt'><o:p></o:p></span></p>
<p class=MsoNormal><span style='color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>