home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 February / Chip_2001-02_cd1.bin / sharewar / vecad / examples / vb / editor / Main.frm < prev    next >
Text File  |  2000-10-13  |  16KB  |  701 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "VeCAD"
  6.    ClientHeight    =   5730
  7.    ClientLeft      =   165
  8.    ClientTop       =   735
  9.    ClientWidth     =   8250
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   286.5
  12.    ScaleMode       =   2  'Point
  13.    ScaleWidth      =   412.5
  14.    StartUpPosition =   3  'Windows Default
  15.    WindowState     =   2  'Maximized
  16.    Begin VB.Menu File 
  17.       Caption         =   "File"
  18.       Index           =   1
  19.       WindowList      =   -1  'True
  20.       Begin VB.Menu New 
  21.          Caption         =   "New..."
  22.       End
  23.       Begin VB.Menu Open 
  24.          Caption         =   "Open..."
  25.       End
  26.       Begin VB.Menu Save 
  27.          Caption         =   "Save"
  28.       End
  29.       Begin VB.Menu SaveAs 
  30.          Caption         =   "SaveAs..."
  31.       End
  32.       Begin VB.Menu fsep1 
  33.          Caption         =   "-"
  34.       End
  35.       Begin VB.Menu Close 
  36.          Caption         =   "Close"
  37.       End
  38.       Begin VB.Menu CloseAll 
  39.          Caption         =   "Close All"
  40.       End
  41.       Begin VB.Menu DwgList 
  42.          Caption         =   "List..."
  43.       End
  44.       Begin VB.Menu fsep2 
  45.          Caption         =   "-"
  46.       End
  47.       Begin VB.Menu import 
  48.          Caption         =   "Import from"
  49.          Begin VB.Menu impdxf 
  50.             Caption         =   "AutoCAD DXF"
  51.          End
  52.       End
  53.       Begin VB.Menu exp 
  54.          Caption         =   "Export to"
  55.          Begin VB.Menu expdxf 
  56.             Caption         =   "AutoCAD DXF"
  57.          End
  58.          Begin VB.Menu exphpgl 
  59.             Caption         =   "HPGL (PLT)"
  60.          End
  61.          Begin VB.Menu expbmp 
  62.             Caption         =   "Raster Image"
  63.          End
  64.       End
  65.       Begin VB.Menu sv1 
  66.          Caption         =   "-"
  67.       End
  68.       Begin VB.Menu Print 
  69.          Caption         =   "Print..."
  70.       End
  71.       Begin VB.Menu A 
  72.          Caption         =   "-"
  73.       End
  74.       Begin VB.Menu Exit 
  75.          Caption         =   "Exit"
  76.       End
  77.    End
  78.    Begin VB.Menu Edit 
  79.       Caption         =   "Edit"
  80.       Index           =   2
  81.       Begin VB.Menu undo 
  82.          Caption         =   "Undo"
  83.          Shortcut        =   ^Z
  84.       End
  85.       Begin VB.Menu redo 
  86.          Caption         =   "Redo"
  87.       End
  88.       Begin VB.Menu edsep1 
  89.          Caption         =   "-"
  90.       End
  91.       Begin VB.Menu objprop 
  92.          Caption         =   "Properties..."
  93.       End
  94.       Begin VB.Menu edsep2 
  95.          Caption         =   "-"
  96.       End
  97.       Begin VB.Menu Copy 
  98.          Caption         =   "Copy"
  99.       End
  100.       Begin VB.Menu Move 
  101.          Caption         =   "Move"
  102.       End
  103.       Begin VB.Menu Rotate 
  104.          Caption         =   "Rotate"
  105.       End
  106.       Begin VB.Menu scale 
  107.          Caption         =   "Scale"
  108.       End
  109.       Begin VB.Menu mirror 
  110.          Caption         =   "Mirror"
  111.       End
  112.       Begin VB.Menu explode 
  113.          Caption         =   "Explode"
  114.       End
  115.       Begin VB.Menu edsep3 
  116.          Caption         =   "-"
  117.       End
  118.       Begin VB.Menu creblock 
  119.          Caption         =   "Create Block"
  120.       End
  121.       Begin VB.Menu edsep4 
  122.          Caption         =   "-"
  123.       End
  124.       Begin VB.Menu erase 
  125.          Caption         =   "Erase"
  126.       End
  127.    End
  128.    Begin VB.Menu View 
  129.       Caption         =   "View"
  130.       Index           =   3
  131.       Begin VB.Menu ZoomWin 
  132.          Caption         =   "Zoom Window"
  133.          Shortcut        =   ^W
  134.       End
  135.       Begin VB.Menu zoomall 
  136.          Caption         =   "Zoom All"
  137.          Shortcut        =   ^A
  138.       End
  139.       Begin VB.Menu ZoomPan 
  140.          Caption         =   "Zoom Pan"
  141.       End
  142.       Begin VB.Menu ZoomIn 
  143.          Caption         =   "Zoom In"
  144.       End
  145.       Begin VB.Menu ZoomOut 
  146.          Caption         =   "Zoom Out"
  147.       End
  148.       Begin VB.Menu vsep1 
  149.          Caption         =   "-"
  150.       End
  151.       Begin VB.Menu PageFirst 
  152.          Caption         =   "Page First"
  153.       End
  154.       Begin VB.Menu PageLast 
  155.          Caption         =   "Page Last"
  156.       End
  157.       Begin VB.Menu PageNext 
  158.          Caption         =   "Page Next"
  159.       End
  160.       Begin VB.Menu PagePrevious 
  161.          Caption         =   "Page Previous"
  162.       End
  163.       Begin VB.Menu vsep2 
  164.          Caption         =   "-"
  165.       End
  166.       Begin VB.Menu selpage 
  167.          Caption         =   "Select Page"
  168.          Shortcut        =   ^P
  169.       End
  170.       Begin VB.Menu vsep3 
  171.          Caption         =   "-"
  172.       End
  173.       Begin VB.Menu SaveCurrentView 
  174.          Caption         =   "Save Current View..."
  175.       End
  176.       Begin VB.Menu ViewsList 
  177.          Caption         =   "Views List..."
  178.       End
  179.    End
  180.    Begin VB.Menu Format 
  181.       Caption         =   "Format"
  182.       Index           =   4
  183.       Begin VB.Menu Page 
  184.          Caption         =   "Page..."
  185.       End
  186.       Begin VB.Menu Layer 
  187.          Caption         =   "Layer..."
  188.       End
  189.       Begin VB.Menu Linetype 
  190.          Caption         =   "Linetype..."
  191.       End
  192.       Begin VB.Menu TextStyle 
  193.          Caption         =   "Text Style..."
  194.       End
  195.       Begin VB.Menu PointStyle 
  196.          Caption         =   "Point Style..."
  197.       End
  198.       Begin VB.Menu HatchStyle 
  199.          Caption         =   "Hatch Style..."
  200.       End
  201.       Begin VB.Menu Blocks 
  202.          Caption         =   "Blocks..."
  203.       End
  204.       Begin VB.Menu fmtsep1 
  205.          Caption         =   "-"
  206.       End
  207.       Begin VB.Menu DimStyle 
  208.          Caption         =   "Dimension Style..."
  209.       End
  210.       Begin VB.Menu fmtsep2 
  211.          Caption         =   "-"
  212.       End
  213.       Begin VB.Menu Grid 
  214.          Caption         =   "Grid..."
  215.       End
  216.       Begin VB.Menu ObjectSnap 
  217.          Caption         =   "Object Snap..."
  218.       End
  219.       Begin VB.Menu AngleSnap 
  220.          Caption         =   "Angle Snap..."
  221.       End
  222.       Begin VB.Menu fmtsep3 
  223.          Caption         =   "-"
  224.       End
  225.       Begin VB.Menu Units 
  226.          Caption         =   "Units..."
  227.       End
  228.       Begin VB.Menu Private 
  229.          Caption         =   "Private..."
  230.       End
  231.       Begin VB.Menu Preferences 
  232.          Caption         =   "Preferences..."
  233.       End
  234.    End
  235.    Begin VB.Menu Draw 
  236.       Caption         =   "Draw"
  237.       Index           =   5
  238.       Begin VB.Menu point 
  239.          Caption         =   "Point"
  240.       End
  241.       Begin VB.Menu Line 
  242.          Caption         =   "Line"
  243.       End
  244.       Begin VB.Menu Polyline 
  245.          Caption         =   "Polyline"
  246.       End
  247.       Begin VB.Menu Spline 
  248.          Caption         =   "Spline"
  249.       End
  250.       Begin VB.Menu Circle 
  251.          Caption         =   "Circle"
  252.          Begin VB.Menu CenterRadius 
  253.             Caption         =   "Center, Radius"
  254.          End
  255.          Begin VB.Menu CenterDiameter 
  256.             Caption         =   "Center, Diameter"
  257.          End
  258.          Begin VB.Menu Points2 
  259.             Caption         =   "2 Points"
  260.          End
  261.          Begin VB.Menu Points3 
  262.             Caption         =   "3 Points"
  263.          End
  264.       End
  265.       Begin VB.Menu arc 
  266.          Caption         =   "Arc"
  267.          Begin VB.Menu CenterStartEnd 
  268.             Caption         =   "Center, Start, End"
  269.          End
  270.          Begin VB.Menu StartEndMiddle 
  271.             Caption         =   "Start, End, Middle"
  272.          End
  273.          Begin VB.Menu StartMiddleEnd 
  274.             Caption         =   "Start, Middle, End"
  275.          End
  276.       End
  277.       Begin VB.Menu ellipse 
  278.          Caption         =   "Ellipse"
  279.       End
  280.       Begin VB.Menu Rectangle 
  281.          Caption         =   "Rectangle"
  282.       End
  283.       Begin VB.Menu Dimension 
  284.          Caption         =   "Dimension"
  285.          Begin VB.Menu DimHor 
  286.             Caption         =   "Horizontal"
  287.          End
  288.          Begin VB.Menu DimVer 
  289.             Caption         =   "Verical"
  290.          End
  291.          Begin VB.Menu DimPar 
  292.             Caption         =   "Parallel"
  293.          End
  294.          Begin VB.Menu DimAng 
  295.             Caption         =   "Angular"
  296.          End
  297.          Begin VB.Menu DimRad 
  298.             Caption         =   "Radial"
  299.          End
  300.          Begin VB.Menu DimDiam 
  301.             Caption         =   "Diametric"
  302.          End
  303.          Begin VB.Menu DimOrd 
  304.             Caption         =   "Ordinate"
  305.          End
  306.       End
  307.       Begin VB.Menu Hatch 
  308.          Caption         =   "Hatch"
  309.       End
  310.       Begin VB.Menu drsep1 
  311.          Caption         =   "-"
  312.       End
  313.       Begin VB.Menu Text 
  314.          Caption         =   "Text..."
  315.       End
  316.       Begin VB.Menu Symbol 
  317.          Caption         =   "TTF Symbol..."
  318.       End
  319.       Begin VB.Menu Block 
  320.          Caption         =   "Block..."
  321.       End
  322.       Begin VB.Menu bitmap 
  323.          Caption         =   "Raster Image..."
  324.       End
  325.       Begin VB.Menu RMap 
  326.          Caption         =   "Mosaic Raster Map..."
  327.       End
  328.    End
  329.    Begin VB.Menu tools 
  330.       Caption         =   "Tools"
  331.       Begin VB.Menu DistArea 
  332.          Caption         =   "Distance / Area"
  333.       End
  334.       Begin VB.Menu prnrect 
  335.          Caption         =   "Split drawing for print"
  336.       End
  337.       Begin VB.Menu Stat 
  338.          Caption         =   "Statistics..."
  339.       End
  340.    End
  341.    Begin VB.Menu Help 
  342.       Caption         =   "Help"
  343.       Begin VB.Menu About 
  344.          Caption         =   "About..."
  345.       End
  346.    End
  347. End
  348. Attribute VB_Name = "Form1"
  349. Attribute VB_GlobalNameSpace = False
  350. Attribute VB_Creatable = False
  351. Attribute VB_PredeclaredId = True
  352. Attribute VB_Exposed = False
  353.  
  354.  
  355. Private Sub Command1_Click()
  356. End Sub
  357.  
  358. Private Sub About_Click()
  359. '  About.Show
  360. End Sub
  361.  
  362. Private Sub AngleSnap_Click()
  363.   vlExecute VC_FMT_PSNAP
  364. End Sub
  365.  
  366. Private Sub bitmap_Click()
  367.   vlExecute VC_INS_IMAGE
  368. End Sub
  369.  
  370. Private Sub block_Click()
  371.   vlExecute VC_INS_BLOCK
  372. End Sub
  373.  
  374. Private Sub Blocks_Click()
  375.   vlExecute VC_FMT_BLOCK
  376. End Sub
  377.  
  378. Private Sub CenterDiameter_Click()
  379.   vlExecute VC_DRAW_CIRC_CD
  380. End Sub
  381.  
  382. Private Sub CenterRadius_Click()
  383.   vlExecute VC_DRAW_CIRC_CR
  384. End Sub
  385.  
  386. Private Sub CenterStartEnd_Click()
  387.   vlExecute VC_DRAW_ARC_CSE
  388. End Sub
  389.  
  390.  
  391. Private Sub Command3_Click()
  392. End Sub
  393.  
  394. Private Sub Close_Click()
  395.   vlExecute VC_FILE_CLOSE
  396. End Sub
  397.  
  398. Private Sub CloseAll_Click()
  399.   vlExecute VC_FILE_CLOSEALL
  400. End Sub
  401.  
  402. Private Sub Copy_Click()
  403.   vlExecute VC_EDIT_COPY
  404. End Sub
  405.  
  406. Private Sub creblock_Click()
  407.   vlExecute VC_EDIT_CREBLOCK
  408. End Sub
  409.  
  410. Private Sub DimAng_Click()
  411.   vlExecute VC_DRAW_DIM_ANG
  412. End Sub
  413.  
  414. Private Sub DimDiam_Click()
  415.   vlExecute VC_DRAW_DIM_DIAM
  416. End Sub
  417.  
  418. Private Sub DimHor_Click()
  419.   vlExecute VC_DRAW_DIM_HOR
  420. End Sub
  421.  
  422. Private Sub DimOrd_Click()
  423.   vlExecute VC_DRAW_DIM_ORD
  424. End Sub
  425.  
  426. Private Sub DimPar_Click()
  427.   vlExecute VC_DRAW_DIM_PAR
  428. End Sub
  429.  
  430. Private Sub DimRad_Click()
  431.   vlExecute VC_DRAW_DIM_RAD
  432. End Sub
  433.  
  434. Private Sub DimStyle_Click()
  435.   vlExecute VC_FMT_STDIM
  436. End Sub
  437.  
  438. Private Sub DimVer_Click()
  439.   vlExecute VC_DRAW_DIM_VER
  440. End Sub
  441.  
  442. Private Sub DistArea_Click()
  443.   vlExecute VC_TOOL_DIST
  444. End Sub
  445.  
  446. Private Sub DwgList_Click()
  447.   vlExecute VC_FILE_LIST
  448. End Sub
  449.  
  450. Private Sub ellipse_Click()
  451.   vlExecute VC_DRAW_ELLIPSE
  452. End Sub
  453.  
  454. Private Sub erase_Click()
  455.   vlExecute VC_EDIT_ERASE
  456. End Sub
  457.  
  458. Private Sub Exit_Click()
  459.   Unload Form1
  460. End Sub
  461.  
  462. Private Sub expbmp_Click()
  463.   vlExecute VC_EXPORT_BMP
  464. End Sub
  465.  
  466. Private Sub expdxf_Click()
  467.   vlExecute VC_EXPORT_DXF
  468. End Sub
  469.  
  470. Private Sub exphpgl_Click()
  471.   vlExecute VC_EXPORT_HPGL
  472. End Sub
  473.  
  474. Private Sub explode_Click()
  475.   vlExecute VC_EDIT_EXPLODE
  476. End Sub
  477.  
  478. Private Sub FileProp_Click()
  479. End Sub
  480.  
  481. Private Sub Form_Initialize()
  482.   CreateVecWindow hwnd
  483. End Sub
  484.  
  485. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  486.   Dim ret As Boolean
  487.   ret = vlExecute(VC_FILE_CLOSEALL)
  488.   If (ret = False) Then
  489.     Cancel = 1   ' don't close window
  490.   End If
  491. End Sub
  492.  
  493. Private Sub Form_Resize()
  494.   ResizeVecWindow hwnd
  495. End Sub
  496.  
  497. Private Sub menu1_Click()
  498. End Sub
  499.  
  500. Private Sub Grid_Click()
  501.   vlExecute VC_FMT_GRID
  502. End Sub
  503.  
  504. Private Sub hatch_Click()
  505.   vlExecute VC_DRAW_HATCH
  506. End Sub
  507.  
  508. Private Sub HatchStyle_Click()
  509.   vlExecute VC_FMT_STHATCH
  510. End Sub
  511.  
  512. Private Sub impdxf_Click()
  513.   vlExecute VC_IMPORT_DXF
  514. End Sub
  515.  
  516. Private Sub Layer_Click()
  517.   vlExecute VC_FMT_LAYER
  518. End Sub
  519.  
  520. Private Sub Line_Click()
  521.   vlExecute VC_DRAW_LINE
  522. End Sub
  523.  
  524. Private Sub Linetype_Click()
  525.   vlExecute VC_FMT_STLINE
  526. End Sub
  527.  
  528. Private Sub mirror_Click()
  529.   vlExecute VC_EDIT_MIRROR
  530. End Sub
  531.  
  532. Private Sub Move_Click()
  533.   vlExecute VC_EDIT_MOVE
  534. End Sub
  535.  
  536. Private Sub New_Click()
  537.   FileNew
  538. End Sub
  539.  
  540. Private Sub ObjectSnap_Click()
  541.   vlExecute VC_FMT_OSNAP
  542. End Sub
  543.  
  544. Private Sub objprop_Click()
  545.   vlExecute VC_EDIT_ENTPROP
  546. End Sub
  547.  
  548. Private Sub Open_Click()
  549.   FileOpen
  550. End Sub
  551.  
  552. Private Sub Page_Click()
  553.   vlExecute VC_FMT_PAGE
  554. End Sub
  555.  
  556. Private Sub PageFirst_Click()
  557.   vlExecute VC_PAGE_FIRST
  558. End Sub
  559.  
  560. Private Sub PageLast_Click()
  561.   vlExecute VC_PAGE_LAST
  562. End Sub
  563.  
  564. Private Sub PageNext_Click()
  565.   vlExecute VC_PAGE_NEXT
  566. End Sub
  567.  
  568. Private Sub PagePrevious_Click()
  569.   vlExecute VC_PAGE_PREV
  570. End Sub
  571.  
  572. Private Sub point_Click()
  573.   vlExecute VC_DRAW_POINT
  574. End Sub
  575.  
  576. Private Sub Points2_Click()
  577.   vlExecute VC_DRAW_CIRC_2P
  578. End Sub
  579.  
  580. Private Sub Points3_Click()
  581.   vlExecute VC_DRAW_CIRC_3P
  582. End Sub
  583.  
  584. Private Sub PointStyle_Click()
  585.   vlExecute VC_FMT_STPOINT
  586. End Sub
  587.  
  588. Private Sub Polyline_Click()
  589.   vlExecute VC_DRAW_POLYLINE
  590. End Sub
  591.  
  592. Private Sub Preferences_Click()
  593.   vlExecute VC_FMT_PREFERS
  594. End Sub
  595.  
  596. Private Sub Print_Click()
  597.   vlExecute VC_PRINT
  598. End Sub
  599.  
  600. Private Sub Private_Click()
  601.   vlExecute VC_FMT_PRIVATE
  602. End Sub
  603.  
  604. Private Sub prnrect_Click()
  605.   vlExecute VC_TOOL_PRNRECT
  606. End Sub
  607.  
  608. Private Sub rectangle_Click()
  609.   vlExecute VC_DRAW_RECT
  610. End Sub
  611.  
  612. Private Sub redo_Click()
  613.   vlExecute VC_EDIT_REDO
  614. End Sub
  615.  
  616. Private Sub RMap_Click()
  617.   vlExecute VC_INS_RMAP
  618. End Sub
  619.  
  620. Private Sub Rotate_Click()
  621.   vlExecute VC_EDIT_ROTATE
  622. End Sub
  623.  
  624. Private Sub Save_Click()
  625.   vlExecute VC_FILE_SAVE
  626. End Sub
  627.  
  628. Private Sub SaveAs_Click()
  629.   vlExecute VC_FILE_SAVEAS
  630. End Sub
  631.  
  632. Private Sub SaveCurrentView_Click()
  633.   vlExecute VC_VIEW_SAVE
  634. End Sub
  635.  
  636. Private Sub scale_Click()
  637.   vlExecute VC_EDIT_SCALE
  638. End Sub
  639.  
  640.  
  641. Private Sub selpage_Click()
  642.   vlExecute VC_PAGE_DLG
  643. End Sub
  644.  
  645.  
  646. Private Sub Spline_Click()
  647.   vlExecute VC_DRAW_SPLINE
  648. End Sub
  649.  
  650. Private Sub StartEndMiddle_Click()
  651.   vlExecute VC_DRAW_ARC_SEM
  652. End Sub
  653.  
  654. Private Sub StartMiddleEnd_Click()
  655.   vlExecute VC_DRAW_ARC_SME
  656. End Sub
  657.  
  658. Private Sub Stat_Click()
  659.   vlExecute VC_TOOL_STAT
  660. End Sub
  661.  
  662. Private Sub symbol_Click()
  663.   vlExecute VC_INS_SYMBOL
  664. End Sub
  665.  
  666. Private Sub text_Click()
  667.   vlExecute VC_INS_TEXT
  668. End Sub
  669.  
  670. Private Sub TextStyle_Click()
  671.   vlExecute VC_FMT_STTEXT
  672. End Sub
  673.  
  674. Private Sub undo_Click()
  675.   vlExecute VC_EDIT_UNDO
  676. End Sub
  677.  
  678. Private Sub Units_Click()
  679.   vlExecute VC_FMT_UNITS
  680. End Sub
  681.  
  682. Private Sub ViewsList_Click()
  683.   vlExecute VC_VIEW_LIST
  684. End Sub
  685.  
  686. Private Sub zoomall_Click()
  687.   vlExecute VC_ZOOM_ALL
  688. End Sub
  689.  
  690. Private Sub ZoomIn_Click()
  691.   vlExecute VC_ZOOM_IN
  692. End Sub
  693.  
  694. Private Sub ZoomOut_Click()
  695.   vlExecute VC_ZOOM_OUT
  696. End Sub
  697.  
  698. Private Sub ZoomWin_Click()
  699.   vlExecute VC_ZOOM_WIN
  700. End Sub
  701.