Kadmos.com


?>

  Home | Products | Download | Purchase | Support | Language

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 - ShowRubberLine Method

Kadmos DXFReader ActiveX Control      Previous Next
DXFReader Control
ShowRubberLine Method

Description Shows the distance specified by the X1, Y1, X2 and Y2 parameters. as a dashed line.
Syntax [form.]DXFReader.ShowRubberLine (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 drawing a line or selecting a linear distance as a rubber-band line.

To show how to use this method for selecting a panning distance 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 OnPanStart As Boolean
Private OnPanEnd 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 Pan).
Add the following code to the Command1 Click event:

Private Sub Command1_Click()

 OnPanStart = True
 DXFReader1.MousePointer = drCross

End Sub


Add the following code to the DXFReader1 MouseUp event:

If OnPanEnd Then
 DXFReader1.Pan X0, Y0, X, Y
 OnPanEnd = False
 DXFReader1.MousePointer = drDefault
End If

If OnPanStart Then
 X0 = X
 Y0 = Y
 OnPanStart = False
 OnPanEnd = True
End If


Add the following code to the DXFReader1 MouseMove event:

If OnPanEnd Then

 DXFReader1.ShowRubberLine X0, Y0, X, Y

End If

The parameters for the ShowRubberLine method are described below:

ParameterDescription

X1X coordinate of the start of the segment
Y1Y coordinate of the start of the segment
X2X coordinate of the end of the segment
Y2Y coordinate of the end of the segment

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