Kadmos.com

  Home | Products | Download | Purchase | Support | Language

Google
Search site:

Products
DXFReader ActiveX Control
 • DXF Files Overview
 • Distribution
 • Installation
 • Quick Start
 • Control Summary
 • Download
 • Buy now!
 • DXFReader Reference
  • Properties
  • Methods
   • About
   • AddAlignedDi...
   • AddBlock
   • AddBlockEntity
   • AddClass
   • AddDimStyle
   • AddEntity
   • AddLayer
   • AddLineType
   • AddObject
   • AddStyle
   • AddUCS
   • AddVertex
   • AddView
   • AddViewPort
   • Clear
   • CoordXtoPixel
   • CoordYtoPixel
   • Copy
   • DisplayView
   • DrawArc
   • DrawCircle
   • DrawEntity
   • DrawLine
   • DrawPoint
   • DrawText
   • ExplodeBlock
   • GetACIColor
   • GetEntity
   • GetRGBColor
   • InvertEntity
   • LoadBlock
   • ModifyEntity
   • NewDrawing
   • Pan
   • PixelXtoCoord
   • PixelYtoCoord
   • Plot
   • PlotPreview
   • PopupMenu
   • ReadDXF
   • ReadDXFBlocks
   • ReadDXFEntities
   • Refresh
   • Regen
   • SaveBMP
   • SaveWMF
   • SetLimits
   • ShowBlock
   • ShowPalette
   • ShowRubberAl...
   • ShowRubberBox
   • ShowRubberCi...
   • ShowRubberLine
   • WriteDXF
   • WriteDXFBlock
   • ZoomExtents
   • ZoomIn
   • ZoomLimits
   • ZoomOut
   • ZoomPicture
   • ZoomPrevious
   • ZoomSpotIn
   • ZoomSpotOut
   • ZoomUser
   • ZoomWindow
  • Events

 • DXFPlot Reference

IXF ActiveX Control

Postel ActiveX Control

Tech Support
OnLine Support
Phone Support
Sample Code
Registered Users
FAQ
References
Kadmos
Contact Kadmos
Environment
Customer List
Newsletter
Download
ActiveX Controls
Updates
Purchase
Price List
International Resellers
Our Guarantee
Shipment Options
Payment Options
Shopping Cart
    DXFReader Control - ShowRubberBox Method

Kadmos DXFReader ActiveX Control      Previous Next
DXFReader Control
ShowRubberBox Method

Description Shows the window specified by the X1, Y1, X2 and Y2 parameters. as a dashed rectangle.
Syntax [form.]DXFReader.ShowRubberBox (X1 As Single, Y1 As Single, X2 As Single, Y2 As Single)
Remarks This method is usually called from the MouseMove event to provide feedback to the user while zooming or selecting a rectangular shape.

To show how to use this method for selecting a zooming window let's examine the example below.

Place a DXFReader control (Name property: DXFReader1) on a form.

Add the following code to the declaration section of the form

Option Explicit
Private OnZoomWindowStart As Boolean
Private OnZoomWindowEnd As Boolean
Private X0 As Single
Private Y0 As Single


and the following code to the Form1 Load event:

Private Sub Form1_Load()

 DXFReader1.ReadDXF "Example.dxf"

End Sub


Place a Command Button (Name property: Command1) in the upper right corner of the form (set the Caption property to Zoom Window).
Add the following code to the Command1 Click event:

Private Sub Command1_Click()

 OnZoomWindowStart = True
 DXFReader1.MousePointer = drCross

End Sub


Add the following code to the DXFReader1 MouseUp event:

If OnZoomWindowEnd Then
 DXFReader1.ZoomWindow X0, Y0, X, Y
 OnZoomWindowEnd = False
 DXFReader1.MousePointer = drDefault
End If

If OnZoomWindowStart Then
 X0 = X
 Y0 = Y
 OnZoomWindowStart = False
 OnZoomWindowEnd = True
End If


Add the following code to the DXFReader1 MouseMove event:

If OnZoomWindowEnd Then
 DXFReader1.ShowRubberBox X0, Y0, X, Y
End If

The parameters for the ShowRubberBox method are described below:

ParameterDescription

X1X coordinate of the lower-left corner
Y1Y coordinate of the lower-left corner
X2X coordinate of the upper-right corner
Y2Y coordinate of the upper-right corner

Copyright © 2008 Kadmos.com - All rights reserved. Privacy Policy