home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 February / Chip_2001-02_cd1.bin / sharewar / vecad / examples / vb / editor / Main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-10-13  |  15.2 KB  |  610 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. Attribute VB_Name = "Form1"
  348. Attribute VB_GlobalNameSpace = False
  349. Attribute VB_Creatable = False
  350. Attribute VB_PredeclaredId = True
  351. Attribute VB_Exposed = False
  352. Private Sub Command1_Click()
  353. End Sub
  354. Private Sub About_Click()
  355. '  About.Show
  356. End Sub
  357. Private Sub AngleSnap_Click()
  358.   vlExecute VC_FMT_PSNAP
  359. End Sub
  360. Private Sub bitmap_Click()
  361.   vlExecute VC_INS_IMAGE
  362. End Sub
  363. Private Sub block_Click()
  364.   vlExecute VC_INS_BLOCK
  365. End Sub
  366. Private Sub Blocks_Click()
  367.   vlExecute VC_FMT_BLOCK
  368. End Sub
  369. Private Sub CenterDiameter_Click()
  370.   vlExecute VC_DRAW_CIRC_CD
  371. End Sub
  372. Private Sub CenterRadius_Click()
  373.   vlExecute VC_DRAW_CIRC_CR
  374. End Sub
  375. Private Sub CenterStartEnd_Click()
  376.   vlExecute VC_DRAW_ARC_CSE
  377. End Sub
  378. Private Sub Command3_Click()
  379. End Sub
  380. Private Sub Close_Click()
  381.   vlExecute VC_FILE_CLOSE
  382. End Sub
  383. Private Sub CloseAll_Click()
  384.   vlExecute VC_FILE_CLOSEALL
  385. End Sub
  386. Private Sub Copy_Click()
  387.   vlExecute VC_EDIT_COPY
  388. End Sub
  389. Private Sub creblock_Click()
  390.   vlExecute VC_EDIT_CREBLOCK
  391. End Sub
  392. Private Sub DimAng_Click()
  393.   vlExecute VC_DRAW_DIM_ANG
  394. End Sub
  395. Private Sub DimDiam_Click()
  396.   vlExecute VC_DRAW_DIM_DIAM
  397. End Sub
  398. Private Sub DimHor_Click()
  399.   vlExecute VC_DRAW_DIM_HOR
  400. End Sub
  401. Private Sub DimOrd_Click()
  402.   vlExecute VC_DRAW_DIM_ORD
  403. End Sub
  404. Private Sub DimPar_Click()
  405.   vlExecute VC_DRAW_DIM_PAR
  406. End Sub
  407. Private Sub DimRad_Click()
  408.   vlExecute VC_DRAW_DIM_RAD
  409. End Sub
  410. Private Sub DimStyle_Click()
  411.   vlExecute VC_FMT_STDIM
  412. End Sub
  413. Private Sub DimVer_Click()
  414.   vlExecute VC_DRAW_DIM_VER
  415. End Sub
  416. Private Sub DistArea_Click()
  417.   vlExecute VC_TOOL_DIST
  418. End Sub
  419. Private Sub DwgList_Click()
  420.   vlExecute VC_FILE_LIST
  421. End Sub
  422. Private Sub ellipse_Click()
  423.   vlExecute VC_DRAW_ELLIPSE
  424. End Sub
  425. Private Sub erase_Click()
  426.   vlExecute VC_EDIT_ERASE
  427. End Sub
  428. Private Sub Exit_Click()
  429.   Unload Form1
  430. End Sub
  431. Private Sub expbmp_Click()
  432.   vlExecute VC_EXPORT_BMP
  433. End Sub
  434. Private Sub expdxf_Click()
  435.   vlExecute VC_EXPORT_DXF
  436. End Sub
  437. Private Sub exphpgl_Click()
  438.   vlExecute VC_EXPORT_HPGL
  439. End Sub
  440. Private Sub explode_Click()
  441.   vlExecute VC_EDIT_EXPLODE
  442. End Sub
  443. Private Sub FileProp_Click()
  444. End Sub
  445. Private Sub Form_Initialize()
  446.   CreateVecWindow hwnd
  447. End Sub
  448. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  449.   Dim ret As Boolean
  450.   ret = vlExecute(VC_FILE_CLOSEALL)
  451.   If (ret = False) Then
  452.     Cancel = 1   ' don't close window
  453.   End If
  454. End Sub
  455. Private Sub Form_Resize()
  456.   ResizeVecWindow hwnd
  457. End Sub
  458. Private Sub menu1_Click()
  459. End Sub
  460. Private Sub Grid_Click()
  461.   vlExecute VC_FMT_GRID
  462. End Sub
  463. Private Sub hatch_Click()
  464.   vlExecute VC_DRAW_HATCH
  465. End Sub
  466. Private Sub HatchStyle_Click()
  467.   vlExecute VC_FMT_STHATCH
  468. End Sub
  469. Private Sub impdxf_Click()
  470.   vlExecute VC_IMPORT_DXF
  471. End Sub
  472. Private Sub Layer_Click()
  473.   vlExecute VC_FMT_LAYER
  474. End Sub
  475. Private Sub Line_Click()
  476.   vlExecute VC_DRAW_LINE
  477. End Sub
  478. Private Sub Linetype_Click()
  479.   vlExecute VC_FMT_STLINE
  480. End Sub
  481. Private Sub mirror_Click()
  482.   vlExecute VC_EDIT_MIRROR
  483. End Sub
  484. Private Sub Move_Click()
  485.   vlExecute VC_EDIT_MOVE
  486. End Sub
  487. Private Sub New_Click()
  488.   FileNew
  489. End Sub
  490. Private Sub ObjectSnap_Click()
  491.   vlExecute VC_FMT_OSNAP
  492. End Sub
  493. Private Sub objprop_Click()
  494.   vlExecute VC_EDIT_ENTPROP
  495. End Sub
  496. Private Sub Open_Click()
  497.   FileOpen
  498. End Sub
  499. Private Sub Page_Click()
  500.   vlExecute VC_FMT_PAGE
  501. End Sub
  502. Private Sub PageFirst_Click()
  503.   vlExecute VC_PAGE_FIRST
  504. End Sub
  505. Private Sub PageLast_Click()
  506.   vlExecute VC_PAGE_LAST
  507. End Sub
  508. Private Sub PageNext_Click()
  509.   vlExecute VC_PAGE_NEXT
  510. End Sub
  511. Private Sub PagePrevious_Click()
  512.   vlExecute VC_PAGE_PREV
  513. End Sub
  514. Private Sub point_Click()
  515.   vlExecute VC_DRAW_POINT
  516. End Sub
  517. Private Sub Points2_Click()
  518.   vlExecute VC_DRAW_CIRC_2P
  519. End Sub
  520. Private Sub Points3_Click()
  521.   vlExecute VC_DRAW_CIRC_3P
  522. End Sub
  523. Private Sub PointStyle_Click()
  524.   vlExecute VC_FMT_STPOINT
  525. End Sub
  526. Private Sub Polyline_Click()
  527.   vlExecute VC_DRAW_POLYLINE
  528. End Sub
  529. Private Sub Preferences_Click()
  530.   vlExecute VC_FMT_PREFERS
  531. End Sub
  532. Private Sub Print_Click()
  533.   vlExecute VC_PRINT
  534. End Sub
  535. Private Sub Private_Click()
  536.   vlExecute VC_FMT_PRIVATE
  537. End Sub
  538. Private Sub prnrect_Click()
  539.   vlExecute VC_TOOL_PRNRECT
  540. End Sub
  541. Private Sub rectangle_Click()
  542.   vlExecute VC_DRAW_RECT
  543. End Sub
  544. Private Sub redo_Click()
  545.   vlExecute VC_EDIT_REDO
  546. End Sub
  547. Private Sub RMap_Click()
  548.   vlExecute VC_INS_RMAP
  549. End Sub
  550. Private Sub Rotate_Click()
  551.   vlExecute VC_EDIT_ROTATE
  552. End Sub
  553. Private Sub Save_Click()
  554.   vlExecute VC_FILE_SAVE
  555. End Sub
  556. Private Sub SaveAs_Click()
  557.   vlExecute VC_FILE_SAVEAS
  558. End Sub
  559. Private Sub SaveCurrentView_Click()
  560.   vlExecute VC_VIEW_SAVE
  561. End Sub
  562. Private Sub scale_Click()
  563.   vlExecute VC_EDIT_SCALE
  564. End Sub
  565. Private Sub selpage_Click()
  566.   vlExecute VC_PAGE_DLG
  567. End Sub
  568. Private Sub Spline_Click()
  569.   vlExecute VC_DRAW_SPLINE
  570. End Sub
  571. Private Sub StartEndMiddle_Click()
  572.   vlExecute VC_DRAW_ARC_SEM
  573. End Sub
  574. Private Sub StartMiddleEnd_Click()
  575.   vlExecute VC_DRAW_ARC_SME
  576. End Sub
  577. Private Sub Stat_Click()
  578.   vlExecute VC_TOOL_STAT
  579. End Sub
  580. Private Sub symbol_Click()
  581.   vlExecute VC_INS_SYMBOL
  582. End Sub
  583. Private Sub text_Click()
  584.   vlExecute VC_INS_TEXT
  585. End Sub
  586. Private Sub TextStyle_Click()
  587.   vlExecute VC_FMT_STTEXT
  588. End Sub
  589. Private Sub undo_Click()
  590.   vlExecute VC_EDIT_UNDO
  591. End Sub
  592. Private Sub Units_Click()
  593.   vlExecute VC_FMT_UNITS
  594. End Sub
  595. Private Sub ViewsList_Click()
  596.   vlExecute VC_VIEW_LIST
  597. End Sub
  598. Private Sub zoomall_Click()
  599.   vlExecute VC_ZOOM_ALL
  600. End Sub
  601. Private Sub ZoomIn_Click()
  602.   vlExecute VC_ZOOM_IN
  603. End Sub
  604. Private Sub ZoomOut_Click()
  605.   vlExecute VC_ZOOM_OUT
  606. End Sub
  607. Private Sub ZoomWin_Click()
  608.   vlExecute VC_ZOOM_WIN
  609. End Sub
  610.