Display drawing file on a Windows form with VB.NET

Display drawing file on a Windows form with VB.NET

Anonymous
Not applicable
2,634 Views
1 Reply
Message 1 of 2

Display drawing file on a Windows form with VB.NET

Anonymous
Not applicable

Hi,

 

I've created a Windows form with a Picture box and I wish to display a block drawing in the Picture box, or another Windows control if that is appropriate.

 

When running the code lines:

Dim oImage As System.Drawing.Image = System.Drawing.Image.FromFile(sDrawingName)
PictureBox1.Image = oImage

 I get an "out of Memory" error report.

 

This code works quite well if I use a GIF file, rather than a DWG file, so I guess I need another approach.

 

 

Web searches have proved useless.  I did find a C# project at:

http://through-the-interface.typepad.com/.m/through_the_interface/2008/06/autocad-net-ver.html, but I'm unable to get it to run or to work out which of the C# code is relevant.

 

 

 

 

0 Likes
2,635 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
0 Likes