home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / w3d / wpropert.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1998-04-30  |  12.2 KB  |  392 lines

  1. VERSION 5.00
  2. Begin VB.Form wproperties 
  3.    Caption         =   "properties"
  4.    ClientHeight    =   3816
  5.    ClientLeft      =   3204
  6.    ClientTop       =   3480
  7.    ClientWidth     =   5028
  8.    ForeColor       =   &H00808080&
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3816
  11.    ScaleWidth      =   5028
  12.    Begin VB.Frame Frame6 
  13.       Caption         =   "select by mouse "
  14.       Height          =   840
  15.       Left            =   2016
  16.       TabIndex        =   27
  17.       Top             =   2412
  18.       Width           =   1524
  19.       Begin VB.CheckBox CheckLines 
  20.          Caption         =   "lines"
  21.          Height          =   228
  22.          Left            =   108
  23.          TabIndex        =   29
  24.          Top             =   504
  25.          Width           =   948
  26.       End
  27.       Begin VB.CheckBox CheckPoints 
  28.          Caption         =   "points"
  29.          Height          =   192
  30.          Left            =   108
  31.          TabIndex        =   28
  32.          Top             =   216
  33.          Width           =   948
  34.       End
  35.    End
  36.    Begin VB.Frame Frame5 
  37.       Caption         =   "view"
  38.       Height          =   840
  39.       Left            =   108
  40.       TabIndex        =   23
  41.       Top             =   2412
  42.       Width           =   1848
  43.       Begin VB.OptionButton Option2 
  44.          Caption         =   "perspective"
  45.          Height          =   192
  46.          Left            =   108
  47.          TabIndex        =   25
  48.          Top             =   504
  49.          Width           =   1272
  50.       End
  51.       Begin VB.OptionButton Option1 
  52.          Caption         =   "isometric"
  53.          Height          =   192
  54.          Left            =   108
  55.          TabIndex        =   24
  56.          Top             =   216
  57.          Value           =   -1  'True
  58.          Width           =   1200
  59.       End
  60.    End
  61.    Begin VB.Frame Frame3 
  62.       Appearance      =   0  'Flat
  63.       Caption         =   "show"
  64.       ForeColor       =   &H80000008&
  65.       Height          =   1092
  66.       Left            =   2520
  67.       TabIndex        =   18
  68.       Top             =   1224
  69.       Width           =   2352
  70.       Begin VB.CheckBox CheckAxesNames 
  71.          Caption         =   "with names"
  72.          Height          =   192
  73.          Left            =   756
  74.          TabIndex        =   26
  75.          Top             =   828
  76.          Width           =   1452
  77.       End
  78.       Begin VB.CheckBox CheckShow3DplaneXY 
  79.          Caption         =   "plane XOY"
  80.          Height          =   228
  81.          Left            =   108
  82.          TabIndex        =   22
  83.          Top             =   180
  84.          Width           =   1352
  85.       End
  86.       Begin VB.CheckBox CheckXYZproportional 
  87.          Caption         =   "XYZ proportional to axes"
  88.          Height          =   228
  89.          Left            =   108
  90.          TabIndex        =   21
  91.          Top             =   396
  92.          Width           =   2040
  93.       End
  94.       Begin VB.CheckBox Checkshow3Dbound 
  95.          Caption         =   "boundaries"
  96.          Height          =   228
  97.          Left            =   108
  98.          TabIndex        =   20
  99.          Top             =   612
  100.          Width           =   1668
  101.       End
  102.       Begin VB.CheckBox Checkshow3Daxes 
  103.          Caption         =   "axes"
  104.          Height          =   192
  105.          Left            =   108
  106.          TabIndex        =   19
  107.          Top             =   828
  108.          Width           =   1812
  109.       End
  110.    End
  111.    Begin VB.Frame Frame4 
  112.       Caption         =   "Z axis"
  113.       Height          =   1100
  114.       Left            =   2520
  115.       TabIndex        =   13
  116.       Top             =   108
  117.       Width           =   2352
  118.       Begin VB.TextBox txtZmax 
  119.          Height          =   336
  120.          Left            =   864
  121.          TabIndex        =   15
  122.          Text            =   "txtZmax"
  123.          Top             =   612
  124.          Width           =   1344
  125.       End
  126.       Begin VB.TextBox txtZmin 
  127.          Height          =   336
  128.          Left            =   864
  129.          TabIndex        =   14
  130.          Text            =   "txtZmin"
  131.          Top             =   216
  132.          Width           =   1344
  133.       End
  134.       Begin VB.Label Label10 
  135.          Caption         =   "Maximun"
  136.          Height          =   264
  137.          Left            =   144
  138.          TabIndex        =   17
  139.          Top             =   684
  140.          Width           =   876
  141.       End
  142.       Begin VB.Label Label7 
  143.          Caption         =   "Minimum"
  144.          Height          =   228
  145.          Left            =   144
  146.          TabIndex        =   16
  147.          Top             =   288
  148.          Width           =   804
  149.       End
  150.    End
  151.    Begin VB.CommandButton btnApply 
  152.       Caption         =   "Apply"
  153.       Height          =   280
  154.       Left            =   4068
  155.       TabIndex        =   12
  156.       Top             =   2988
  157.       Width           =   768
  158.    End
  159.    Begin VB.CommandButton btnCancel 
  160.       Caption         =   "Cancel"
  161.       Height          =   280
  162.       Left            =   4068
  163.       TabIndex        =   11
  164.       Top             =   2700
  165.       Width           =   768
  166.    End
  167.    Begin VB.CommandButton Command1 
  168.       Caption         =   "OK"
  169.       Height          =   280
  170.       Left            =   4068
  171.       TabIndex        =   10
  172.       Top             =   2412
  173.       Width           =   768
  174.    End
  175.    Begin VB.Frame Frame2 
  176.       Caption         =   "Y axis"
  177.       Height          =   1100
  178.       Left            =   108
  179.       TabIndex        =   5
  180.       Top             =   1224
  181.       Width           =   2352
  182.       Begin VB.TextBox txtYmin 
  183.          Height          =   336
  184.          Left            =   864
  185.          TabIndex        =   7
  186.          Text            =   "txtYmin"
  187.          Top             =   216
  188.          Width           =   1344
  189.       End
  190.       Begin VB.TextBox txtYmax 
  191.          Height          =   336
  192.          Left            =   864
  193.          TabIndex        =   6
  194.          Text            =   "txtYmax"
  195.          Top             =   612
  196.          Width           =   1344
  197.       End
  198.       Begin VB.Label Label6 
  199.          Caption         =   "Minimum"
  200.          Height          =   228
  201.          Left            =   144
  202.          TabIndex        =   9
  203.          Top             =   288
  204.          Width           =   804
  205.       End
  206.       Begin VB.Label Label5 
  207.          Caption         =   "Maximun"
  208.          Height          =   264
  209.          Left            =   144
  210.          TabIndex        =   8
  211.          Top             =   684
  212.          Width           =   876
  213.       End
  214.    End
  215.    Begin VB.Frame Frame1 
  216.       Caption         =   "X axis"
  217.       Height          =   1100
  218.       Left            =   108
  219.       TabIndex        =   0
  220.       Top             =   108
  221.       Width           =   2352
  222.       Begin VB.TextBox txtXmax 
  223.          Height          =   336
  224.          Left            =   864
  225.          TabIndex        =   4
  226.          Text            =   "txtXmax"
  227.          Top             =   612
  228.          Width           =   1344
  229.       End
  230.       Begin VB.TextBox txtXmin 
  231.          Height          =   336
  232.          Left            =   864
  233.          TabIndex        =   1
  234.          Text            =   "txtXmin"
  235.          Top             =   216
  236.          Width           =   1344
  237.       End
  238.       Begin VB.Label Label3 
  239.          Caption         =   "Maximun"
  240.          Height          =   264
  241.          Left            =   144
  242.          TabIndex        =   3
  243.          Top             =   684
  244.          Width           =   876
  245.       End
  246.       Begin VB.Label Label1 
  247.          Caption         =   "Minimum"
  248.          Height          =   228
  249.          Left            =   144
  250.          TabIndex        =   2
  251.          Top             =   288
  252.          Width           =   804
  253.       End
  254.    End
  255.    Begin VB.Label Label2 
  256.       Caption         =   "W3D 3D figures ActiveX v1.0:   vnode@luckynet.co.il"
  257.       ForeColor       =   &H000000FF&
  258.       Height          =   264
  259.       Left            =   1044
  260.       TabIndex        =   30
  261.       Top             =   3456
  262.       Width           =   3792
  263.    End
  264. Attribute VB_Name = "wproperties"
  265. Attribute VB_GlobalNameSpace = False
  266. Attribute VB_Creatable = False
  267. Attribute VB_PredeclaredId = True
  268. Attribute VB_Exposed = False
  269. Private Sub btnApply_Click()
  270.    If Not IsNumeric(txtXmin) Then
  271.         MsgBox "minimum X scale value must be a number", vbExclamation, "X axis definition"
  272.         txtXmin.SelStart = 0: txtXmin.SelLength = Len(txtXmin)
  273.         txtXmin.SetFocus
  274.         Exit Sub
  275.    End If
  276.     w3Dfrm.W3Dctl1.Xmin = Val(txtXmin)
  277.    If Not IsNumeric(txtXmax) Then
  278.         MsgBox "maximum X scale value must be a number", vbExclamation, "X axis definition"
  279.         txtXmax.SelStart = 0: txtXmax.SelLength = Len(txtXmax)
  280.         txtXmax.SetFocus
  281.         Exit Sub
  282.    End If
  283.     w3Dfrm.W3Dctl1.Xmax = Val(txtXmax)
  284.    If Not IsNumeric(txtYmin) Then
  285.         MsgBox "minimum Y scale value must be a number", vbExclamation, "Y axis definition"
  286.         txtYmin.SelStart = 0: txtYmin.SelLength = Len(txtYmin)
  287.         txtYmin.SetFocus
  288.         Exit Sub
  289.    End If
  290.     w3Dfrm.W3Dctl1.Ymin = Val(txtYmin)
  291.    If Not IsNumeric(txtYmax) Then
  292.         MsgBox "maximum Y scale value must be a number", vbExclamation, "Y axis definition"
  293.         txtYmax.SelStart = 0: txtYmax.SelLength = Len(txtYmax)
  294.         txtYmax.SetFocus
  295.         Exit Sub
  296.    End If
  297.     w3Dfrm.W3Dctl1.Ymax = Val(txtYmax)
  298.    If Not IsNumeric(txtZmin) Then
  299.         MsgBox "minimum Z scale value must be a number", vbExclamation, "Z axis definition"
  300.         txtZmin.SelStart = 0: txtZmin.SelLength = Len(txtZmin)
  301.         txtZmin.SetFocus
  302.         Exit Sub
  303.    End If
  304.     w3Dfrm.W3Dctl1.Zmin = Val(txtZmin)
  305.    If Not IsNumeric(txtZmax) Then
  306.         MsgBox "maximum Z scale value must be a number", vbExclamation, "Z axis definition"
  307.         txtZmax.SelStart = 0: txtZmax.SelLength = Len(txtZmax)
  308.         txtZmax.SetFocus
  309.         Exit Sub
  310.    End If
  311.     w3Dfrm.W3Dctl1.Zmax = Val(txtZmax)
  312.    If Val(txtXmin) >= Val(txtXmax) Then
  313.         MsgBox "minimum X scale value must be less then maximum", vbExclamation, "X axis definition"
  314.         txtXmin.SelText = txtXmin
  315.         txtXmin.SetFocus
  316.         Exit Sub
  317.    End If
  318.    If Val(txtYmin) >= Val(txtYmax) Then
  319.         MsgBox "minimum Y scale value must be less then maximum", vbExclamation, "Y axis definition"
  320.         txtYmin.SelText = txtXmin
  321.         txtYmin.SetFocus
  322.         Exit Sub
  323.    End If
  324.    With w3Dfrm.W3Dctl1
  325.      If Option2.Value = True Then
  326.        .isPerspective = True
  327.      Else
  328.        .isPerspective = False
  329.      End If
  330.      If CheckPoints Then
  331.         .SelectPointByMouse = True
  332.      Else
  333.         .SelectPointByMouse = False
  334.      End If
  335.      If CheckLines Then
  336.         .SelectLineByMouse = True
  337.      Else
  338.         .SelectLineByMouse = False
  339.      End If
  340.      If Checkshow3Daxes Then
  341.        .show3Daxes = True
  342.      Else
  343.        .show3Daxes = False
  344.      End If
  345.      If Checkshow3Dbound Then
  346.        .show3Dboundaries = True
  347.      Else
  348.        .show3Dboundaries = False
  349.      End If
  350.      If CheckXYZproportional Then
  351.        .drawXYZproportional2Ranges = True
  352.      Else
  353.        .drawXYZproportional2Ranges = False
  354.      End If
  355.      If CheckShow3DplaneXY Then
  356.        .show3DplaneXY = True
  357.      Else
  358.        .show3DplaneXY = False
  359.      End If
  360.      .Show3D True
  361.      If CheckAxesNames Then
  362.       .show3DaxesNames = True
  363.      Else
  364.       .show3DaxesNames = False
  365.      End If
  366.    End With
  367. End Sub
  368. Private Sub Command1_Click()
  369.    btnApply_Click
  370.    wproperties.Hide
  371. End Sub
  372. Private Sub btnCancel_Click()
  373.     w3Dfrm.W3Dctl1.Xmin = oldXmin
  374.     w3Dfrm.W3Dctl1.Xmax = oldXmax
  375.     w3Dfrm.W3Dctl1.Ymin = oldYmin
  376.     w3Dfrm.W3Dctl1.Ymax = oldYmax
  377.     w3Dfrm.W3Dctl1.Zmin = oldZmin
  378.     w3Dfrm.W3Dctl1.Zmax = oldZmax
  379.    With w3Dfrm.W3Dctl1
  380.      .show3DplaneXY = Oldshow3DplaneXY
  381.      .show3Dboundaries = oldshow3Dboundaries
  382.      .drawXYZproportional2Ranges = olddrawXYZproportional2Ranges
  383.      .show3Daxes = oldshow3Daxes
  384.      .isPerspective = OldshowIsPerspective
  385.      .show3DaxesNames = oldshow3DaxesNames
  386.      .SelectPointByMouse = oldSelectPointByMouse
  387.      .SelectLineByMouse = oldSelectLineByMouse
  388.      .Show3D True
  389.    End With
  390.    wproperties.Hide
  391. End Sub
  392.