Article | 60000079 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 3/15/2007 |
Submitted by | Raymond Toh |
Keywords |
VdFramedControl1.BaseControl.ActiveDocument.Open(
"C:\temp\EXAMPLE.dxf")
VdFramedControl1.BaseControl.ActiveDocument.CommandAction.CmdSelect("ALL")
Dim selset As VectorDraw.Professional.vdCollections.vdSelection
selset = VdFramedControl1.BaseControl.ActiveDocument.Selections.FindName("VDRAW_PREVIOUS_SELSET")
Dim a As VectorDraw.Geometry.Box|
a = selset.GetBoundingBox
PictureBox1.Width = 200 ' exported image will be 200x200 pixels
PictureBox1.Height = 200
Dim img1 As Image
img1 = New Bitmap(PictureBox1.Width, PictureBox1.Height)
Dim graph As System.Drawing.Graphics
graph = Graphics.FromImage(img1)
VdFramedControl1.BaseControl.ActiveDocument.ActiveLayOut.RenderToGraphics(graph, a, img1.Width, img1.Height)
img1.Save("C:\_temp\aaaaa.bmp") 'save to disk
PictureBox1.Image = img1 ' show in form's Picture box