home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / grafik / 3d4vb / 3d4vb.bas < prev    next >
Encoding:
BASIC Source File  |  1995-02-27  |  20.7 KB  |  623 lines

  1.  
  2. Sub BorderBox (Ctrl1 As Control, Ctrl2 As Control, H%)
  3.     OldDWVal = Ctrl2.DrawWidth
  4.     Ctrl2.DrawWidth = 1
  5.     Cleft% = Ctrl1.Left - 15
  6.     CTop% = Ctrl1.Top - 15
  7.     Cwide% = Ctrl1.Width + 20
  8.     Chigh% = Ctrl1.Height + 15
  9.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  10.     Ctrl2.Line -Step(0, Chigh%), WHITE
  11.     Ctrl2.Line -Step(-Cwide%, 0), WHITE
  12.     Ctrl2.Line -Step(0, -Chigh%), GRAY
  13.     If H% = 2 Then
  14.         Cleft% = Ctrl1.Left - 30
  15.         CTop% = Ctrl1.Top - 30
  16.         Cwide% = Ctrl1.Width + 50
  17.         Chigh% = Ctrl1.Height + 40
  18.         Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  19.         Ctrl2.Line -Step(0, Chigh%), WHITE
  20.         Ctrl2.Line -Step(-Cwide%, 0), WHITE
  21.         Ctrl2.Line -Step(0, -Chigh%), GRAY
  22.     End If
  23.     Ctrl2.DrawWidth = OldDWVal
  24. End Sub     ' BorderBox()
  25.  
  26. Sub BorderBoxOnFrm (Ctrl1 As Control, Ctrl2 As Form)
  27.     OldDWVal = Ctrl2.DrawWidth
  28.     Ctrl2.DrawWidth = 1
  29.     Cleft% = Ctrl1.Left - 15
  30.     CTop% = Ctrl1.Top - 15
  31.     Cwide% = Ctrl1.Width + 20
  32.     Chigh% = Ctrl1.Height + 20
  33.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  34.     Ctrl2.Line -Step(0, Chigh%), WHITE
  35.     Ctrl2.Line -Step(-Cwide%, 0), WHITE
  36.     Ctrl2.Line -Step(0, -Chigh%), GRAY
  37.     Cleft% = Ctrl1.Left - 30
  38.     CTop% = Ctrl1.Top - 30
  39.     Cwide% = Ctrl1.Width + 45
  40.     Chigh% = Ctrl1.Height + 45
  41.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  42.     Ctrl2.Line -Step(0, Chigh%), WHITE
  43.     Ctrl2.Line -Step(-Cwide%, 0), WHITE
  44.     Ctrl2.Line -Step(0, -Chigh%), GRAY
  45.     Ctrl2.DrawWidth = OldDWVal
  46. End Sub     ' BorderBoxOnFrm()
  47.  
  48. Sub EtchedFrame (Ctrl1 As Control, Text$, Just%, ColorVal, Dimen%)
  49.     OldDWVal = Ctrl1.DrawWidth
  50.     Ctrl1.DrawWidth = 1
  51.     ' 0 = Left, 1 = Right, 2 = Center
  52.     TxLen% = Ctrl1.TextWidth(Text$)
  53.     Ctrl1.ForeColor = ColorVal
  54.     C1Left% = Ctrl1.ScaleLeft + 10
  55.     C1Top% = Ctrl1.ScaleTop + (Ctrl1.TextHeight("I") / 2)
  56.     C1Wide% = Ctrl1.ScaleWidth - 30
  57.     C1High% = (Ctrl1.ScaleHeight - 30)
  58.     C2Left% = Ctrl1.ScaleLeft
  59.     C2Top% = Ctrl1.ScaleTop + ((Ctrl1.TextHeight("I") / 2) - 10)
  60.     C2Wide% = Ctrl1.ScaleWidth - 15
  61.     C2High% = (Ctrl1.ScaleHeight - 10)
  62.     Select Case Just%
  63.     Case Is = 0     ' Left
  64.         L1Start% = C1Left%
  65.         L1End% = 120
  66.         R1Start% = L1End% + TxLen% + 240
  67.         R1End% = C1Wide%
  68.         L2Start% = C2Left%
  69.         L2End% = 110
  70.         R2Start% = L2End% + TxLen% + 240
  71.         R2End% = C2Wide%
  72.         Xpos% = 240
  73.         Ypos% = 0
  74.     Case Is = 1     ' Right
  75.         L1Start% = C1Left%
  76.         L1End% = (C1Wide% - TxLen%) - 350
  77.         R1Start% = C1Wide% - 120
  78.         R1End% = C1Wide%
  79.         L2Start% = C2Left%
  80.         L2End% = (C2Wide% - TxLen%) - 350
  81.         R2Start% = C2Wide% - 130
  82.         R2End% = C2Wide%
  83.         Xpos% = L1End% + 120
  84.         Ypos% = 0
  85.     Case Is = 2     ' Center
  86.         L1Start% = C1Left%
  87.         L1End% = (C1Wide% - (TxLen% + 240)) / 2
  88.         R1Start% = C1Wide% - L1End%
  89.         R1End% = C1Wide%
  90.         L2Start% = C2Left%
  91.         L2End% = (C2Wide% - (TxLen% + 240)) / 2
  92.         R2Start% = C2Wide% - L2End%
  93.         R2End% = C2Wide%
  94.         Xpos% = L1End% + 120
  95.         Ypos% = 0
  96.     End Select
  97.     If Dimen% = ETCHED Then
  98.            Ctrl1.CurrentX = Xpos% + 15
  99.            Ctrl1.CurrentY = Ypos% + 15
  100.            Ctrl1.ForeColor = WHITE
  101.            Ctrl1.Print Text$
  102.     End If
  103.     If Dimen% = RAISED Then
  104.            Ctrl1.CurrentX = Xpos% - 15
  105.            Ctrl1.CurrentY = Ypos% - 15
  106.            Ctrl1.ForeColor = WHITE
  107.            Ctrl1.Print Text$
  108.            Ctrl1.CurrentX = Xpos% + 15
  109.            Ctrl1.CurrentY = Ypos% + 15
  110.            Ctrl1.ForeColor = GRAY
  111.            Ctrl1.Print Text$
  112.     End If
  113.     Ctrl1.CurrentX = Xpos%
  114.     Ctrl1.CurrentY = Ypos%
  115.     Ctrl1.ForeColor = ColorVal
  116.     Ctrl1.Print Text$
  117.     Ctrl1.Line (L1Start%, C1Top%)-(L1End%, C1Top%), WHITE
  118.     Ctrl1.Line (R1Start%, C1Top%)-(R1End%, C1Top%), WHITE
  119.     Ctrl1.Line (R1End%, C1Top%)-(R1End%, C1High%), GRAY
  120.     Ctrl1.Line (R1End%, C1High%)-(L1Start%, C1High%), GRAY
  121.     Ctrl1.Line (L1Start%, C1High%)-(L1Start%, C1Top%), WHITE
  122.     Ctrl1.Line (L2Start%, C2Top%)-(L2End%, C2Top%), GRAY
  123.     Ctrl1.Line (R2Start%, C2Top%)-(R2End%, C2Top%), GRAY
  124.     Ctrl1.Line (R2End%, C2Top%)-(R2End%, C2High%), WHITE
  125.     Ctrl1.Line (R2End%, C2High%)-(L2Start%, C2High%), WHITE
  126.     Ctrl1.Line (L2Start%, C2High%)-(L2Start%, C2Top%), GRAY
  127.     Ctrl1.DrawWidth = OldDWVal
  128. End Sub     ' EtchedFrame()
  129.  
  130. Sub EtchedFrmLine (Ctrl1 As Form, X1pos%, Y1pos%, X2pos%, Y2pos%)
  131.     OldDWVal = Ctrl1.DrawWidth
  132.     Ctrl1.AutoRedraw = True
  133.     Ctrl1.DrawWidth = 1
  134.     Ctrl1.Line (X1pos%, Y1pos%)-(X2pos%, Y2pos%), GRAY
  135.     Ctrl1.Line (X1pos% + 15, Y1pos% + 15)-(X2pos% + 15, Y2pos% + 15), WHITE
  136.     Ctrl1.DrawWidth = OldDWVal
  137. End Sub     ' EtchedFrmLine()
  138.  
  139. Sub EtchedFrmText (Ctrl1 As Form, Text$, Xpos%, Ypos%, ColorVal)
  140.     OldDWVal = Ctrl1.DrawWidth
  141.     Ctrl1.DrawWidth = 1
  142.     StartColor = Ctrl1.ForeColor
  143.     Ctrl1.CurrentX = Xpos% + 15
  144.     Ctrl1.CurrentY = Ypos% + 15
  145.     Ctrl1.ForeColor = WHITE
  146.     Ctrl1.Print Text$
  147.     Ctrl1.CurrentX = Xpos%
  148.     Ctrl1.CurrentY = Ypos%
  149.     Ctrl1.ForeColor = ColorVal
  150.     Ctrl1.Print Text$
  151.     Ctrl1.ForeColor = StartColor
  152.     Ctrl1.DrawWidth = OldDWVal
  153. End Sub     ' EtchedFrmText()
  154.  
  155. Sub EtchedPicBorder (Ctrl1 As Control)
  156.     OldDWVal = Ctrl1.DrawWidth
  157.     Ctrl1.DrawWidth = 1
  158.     Cleft% = Ctrl1.ScaleLeft + 10
  159.     CTop% = Ctrl1.ScaleTop + 10
  160.     Cwide% = Ctrl1.ScaleWidth - 30
  161.     Chigh% = Ctrl1.ScaleHeight - 30
  162.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  163.     Ctrl1.Line -Step(0, Chigh%), GRAY
  164.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  165.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  166.     Cleft% = Ctrl1.ScaleLeft
  167.     CTop% = Ctrl1.ScaleTop
  168.     Cwide% = Ctrl1.ScaleWidth - 15
  169.     Chigh% = Ctrl1.ScaleHeight - 15
  170.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  171.     Ctrl1.Line -Step(0, Chigh%), WHITE
  172.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  173.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  174.     Ctrl1.DrawWidth = OldDWVal
  175. End Sub ' EtchedPicBorder()
  176.  
  177. Sub EtchedPicText (Ctrl1 As Control, Text$, Xpos%, Ypos%, ColorVal)
  178.     OldDWVal = Ctrl1.DrawWidth
  179.     Ctrl1.DrawWidth = 1
  180.     StartColor = Ctrl1.ForeColor
  181.     Ctrl1.CurrentX = Xpos% + 15
  182.     Ctrl1.CurrentY = Ypos% + 15
  183.     Ctrl1.ForeColor = WHITE
  184.     Ctrl1.Print Text$
  185.     Ctrl1.CurrentX = Xpos%
  186.     Ctrl1.CurrentY = Ypos%
  187.     Ctrl1.ForeColor = ColorVal
  188.     Ctrl1.Print Text$
  189.     Ctrl1.ForeColor = StartColor
  190.     Ctrl1.DrawWidth = OldDWVal
  191. End Sub     ' EtchedPicText()
  192.  
  193. Sub FormBorder (Ctrl1 As Form)
  194.     OldDWVal = Ctrl1.DrawWidth
  195.     Ctrl1.DrawWidth = 1
  196.     Cleft% = Ctrl1.ScaleLeft
  197.     CTop% = Ctrl1.ScaleTop
  198.     Cwide% = Ctrl1.ScaleWidth - 15
  199.     Chigh% = Ctrl1.ScaleHeight - 15
  200.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  201.     Ctrl1.Line -Step(0, Chigh%), GRAY
  202.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  203.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  204.     Cleft% = Ctrl1.ScaleLeft + 15
  205.     CTop% = Ctrl1.ScaleTop + 15
  206.     Cwide% = Ctrl1.ScaleWidth - 45
  207.     Chigh% = Ctrl1.ScaleHeight - 45
  208.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  209.     Ctrl1.Line -Step(0, Chigh%), GRAY
  210.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  211.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  212.     Ctrl1.DrawWidth = OldDWVal
  213. End Sub     ' FormBorder()
  214.  
  215. Sub FormFrame (Ctrl1 As Form)
  216.     OldDWVal = Ctrl1.DrawWidth
  217.     Ctrl1.DrawWidth = 1
  218.     Cleft% = Ctrl1.ScaleLeft + 60
  219.     CTop% = Ctrl1.ScaleTop + 60
  220.     Cwide% = Ctrl1.ScaleWidth - 130
  221.     Chigh% = Ctrl1.ScaleHeight - 130
  222.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  223.     Ctrl1.Line -Step(0, Chigh%), WHITE
  224.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  225.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  226.     Cleft% = Ctrl1.ScaleLeft
  227.     CTop% = Ctrl1.ScaleTop
  228.     Cwide% = Ctrl1.ScaleWidth - 10
  229.     Chigh% = Ctrl1.ScaleHeight - 10
  230.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  231.     Ctrl1.Line -Step(0, Chigh%), GRAY
  232.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  233.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  234.     Ctrl1.DrawWidth = OldDWVal
  235. End Sub     ' FormFrame()
  236.  
  237. Sub HighlightEntry (Source1 As Control)
  238.     Source1.SelStart = 0
  239.     Source1.SelLength = Len(Source1.Text)
  240. End Sub
  241.  
  242. Sub LabelBox (Ctrl1 As Control, Ctrl2 As Control, Text$, Just%, Vert%, ColorVal, Dimen%)
  243.     OldDWVal = Ctrl2.DrawWidth
  244.     Ctrl2.DrawWidth = 1
  245.     Select Case Vert%
  246.     Case Is = 0
  247.         Ypos% = Ctrl1.Top - Ctrl2.TextHeight("I") - 60
  248.     Case Is = 1
  249.         Ypos% = Ctrl1.Top
  250.     Case Is = 2
  251.         Ypos% = Ctrl1.Top + Ctrl1.Height + 60
  252.     End Select
  253.     Select Case Just%
  254.     Case Is = 0     ' Left of Box
  255.         Xpos% = Ctrl1.Left - (Ctrl2.TextWidth(Text$) + 120)
  256.     Case Is = 1     ' Right of Box
  257.         Xpos% = Ctrl1.Left + Ctrl1.Width + 120
  258.     Case Is = 2     ' Centered with Box
  259.         Xpos% = Ctrl1.Left + ((Ctrl1.Width - Ctrl2.TextWidth(Text$)) / 2)
  260.     End Select
  261.     StartColor = Ctrl1.ForeColor
  262.     If Dimen% = ETCHED Then
  263.         Ctrl2.CurrentX = Xpos% + 15
  264.         Ctrl2.CurrentY = Ypos% + 15
  265.         Ctrl2.ForeColor = WHITE
  266.         Ctrl2.Print Text$
  267.     End If
  268.     If Dimen% = RAISED Then
  269.         Ctrl2.CurrentX = Xpos% - 15
  270.         Ctrl2.CurrentY = Ypos% - 15
  271.         Ctrl2.ForeColor = WHITE
  272.         Ctrl2.Print Text$
  273.         Ctrl2.CurrentX = Xpos% + 15
  274.         Ctrl2.CurrentY = Ypos% + 15
  275.         Ctrl2.ForeColor = GRAY
  276.         Ctrl2.Print Text$
  277.     End If
  278.     Ctrl2.CurrentX = Xpos%
  279.     Ctrl2.CurrentY = Ypos%
  280.     Ctrl2.ForeColor = ColorVal
  281.     Ctrl2.Print Text$
  282.     Ctrl2.DrawWidth = OldDWVal
  283. End Sub     ' LabelBox()
  284.  
  285. Sub LabelBoxOnFrm (Ctrl1 As Control, Ctrl2 As Form, Text$, Just%, Vert%, ColorVal, Dimen%)
  286.     OldDWVal = Ctrl2.DrawWidth
  287.     Ctrl2.DrawWidth = 1
  288.     Select Case Vert%
  289.     Case Is = 0
  290.         Ypos% = Ctrl1.Top - Ctrl2.TextHeight("I") - 60
  291.     Case Is = 1
  292.         Ypos% = Ctrl1.Top
  293.     Case Is = 2
  294.         Ypos% = Ctrl1.Top + Ctrl1.Height + 60
  295.     End Select
  296.     Select Case Just%
  297.     Case Is = 0     ' Left of Box
  298.         Xpos% = Ctrl1.Left - (Ctrl2.TextWidth(Text$) + 120)
  299.     Case Is = 1     ' Right of Box
  300.         Xpos% = Ctrl1.Left + Ctrl1.Width + 120
  301.     Case Is = 2     ' Centered with Box
  302.         Xpos% = Ctrl1.Left + ((Ctrl1.Width - Ctrl2.TextWidth(Text$)) / 2)
  303.     End Select
  304.     StartColor = Ctrl1.ForeColor
  305.     If Dimen% = ETCHED% Then
  306.         Ctrl2.CurrentX = Xpos% + 15
  307.         Ctrl2.CurrentY = Ypos% + 15
  308.         Ctrl2.ForeColor = WHITE
  309.         Ctrl2.Print Text$
  310.     End If
  311.     If Dimen% = RAISED% Then
  312.         Ctrl2.CurrentX = Xpos% - 15
  313.         Ctrl2.CurrentY = Ypos% - 15
  314.         Ctrl2.ForeColor = WHITE
  315.         Ctrl2.Print Text$
  316.         Ctrl2.CurrentX = Xpos% + 15
  317.         Ctrl2.CurrentY = Ypos% + 15
  318.         Ctrl2.ForeColor = GRAY
  319.         Ctrl2.Print Text$
  320.     End If
  321.     Ctrl2.CurrentX = Xpos%
  322.     Ctrl2.CurrentY = Ypos%
  323.     Ctrl2.ForeColor = ColorVal
  324.     Ctrl2.Print Text$
  325.     Ctrl2.DrawWidth = OldDWVal
  326. End Sub     ' LabelBoxOnFrm()
  327.  
  328. Sub LabelInBox (Ctrl1 As Control, Text$, Just%, Vert%, ColorVal, Dimen%)
  329.     OldDWVal = Ctrl1.DrawWidth
  330.     Ctrl1.DrawWidth = 1
  331.     Select Case Just%
  332.     Case Is = 0
  333.         Xpos% = 90
  334.     Case Is = 1
  335.         Xpos% = (Ctrl1.ScaleWidth - Ctrl1.TextWidth(Text$)) - 90
  336.     Case Is = 2
  337.         Xpos% = (Ctrl1.ScaleWidth - Ctrl1.TextWidth(Text$)) / 2
  338.     End Select
  339.     Select Case Vert%
  340.     Case Is = 0
  341.         Ypos% = 90
  342.     Case Is = 1
  343.         Ypos% = ((Ctrl1.ScaleHeight - Ctrl1.TextHeight("I")) / 2)
  344.     Case Is = 2
  345.         Ypos% = Ctrl1.ScaleHeight - (Ctrl1.TextHeight("I") + 90)
  346.     End Select
  347.     StartColor = Ctrl1.ForeColor
  348.     If Dimen% = ETCHED Then
  349.         Ctrl1.CurrentX = Xpos% + 15
  350.         Ctrl1.CurrentY = Ypos% + 15
  351.         Ctrl1.ForeColor = WHITE
  352.         Ctrl1.Print Text$
  353.     End If
  354.     If Dimen% = RAISED Then
  355.         Ctrl1.CurrentX = Xpos% - 15
  356.         Ctrl1.CurrentY = Ypos% - 15
  357.         Ctrl1.ForeColor = WHITE
  358.         Ctrl1.Print Text$
  359.         Ctrl1.CurrentX = Xpos% + 15
  360.         Ctrl1.CurrentY = Ypos% + 15
  361.         Ctrl1.ForeColor = GRAY
  362.         Ctrl1.Print Text$
  363.     End If
  364.     Ctrl1.CurrentX = Xpos%
  365.     Ctrl1.CurrentY = Ypos%
  366.     Ctrl1.ForeColor = ColorVal
  367.     Ctrl1.Print Text$
  368.     Ctrl1.DrawWidth = OldDWVal
  369. End Sub     ' LabelInBox()
  370.  
  371. Sub PicFrame (Ctrl1 As Control)
  372.     OldDWVal = Ctrl1.DrawWidth
  373.     Ctrl1.DrawWidth = 1
  374.     Cleft% = Ctrl1.ScaleLeft + 60
  375.     CTop% = Ctrl1.ScaleTop + 60
  376.     Cwide% = Ctrl1.ScaleWidth - 130
  377.     Chigh% = Ctrl1.ScaleHeight - 130
  378.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  379.     Ctrl1.Line -Step(0, Chigh%), WHITE
  380.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  381.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  382.     Cleft% = Ctrl1.ScaleLeft
  383.     CTop% = Ctrl1.ScaleTop
  384.     Cwide% = Ctrl1.ScaleWidth - 10
  385.     Chigh% = Ctrl1.ScaleHeight - 10
  386.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  387.     Ctrl1.Line -Step(0, Chigh%), GRAY
  388.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  389.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  390.     Ctrl1.DrawWidth = OldDWVal
  391. End Sub     ' PicFrame()
  392.  
  393. Sub PicFramedPaint (Ctrl1 As Control)
  394.     OldDM = Ctrl1.DrawMode
  395.     Ctrl1.DrawMode = 6
  396.     Ctrl1.Line (75, 75)-(Ctrl1.ScaleWidth - 75, Ctrl1.ScaleHeight - 75), , BF
  397.     Ctrl1.DrawMode = OldDM
  398. End Sub     ' PicFramedPaint()
  399.  
  400. Sub PicPaint (Ctrl1 As Control)
  401.     OldDM = Ctrl1.DrawMode
  402.     Ctrl1.DrawMode = 6
  403.     Ctrl1.Line (0, 0)-(Ctrl1.ScaleWidth, Ctrl1.ScaleHeight), , BF
  404.     Ctrl1.DrawMode = OldDM
  405. End Sub     ' PicPaint()
  406.  
  407. Sub RaisedBorderBox (Ctrl1 As Control, Ctrl2 As Control)
  408.     OldDWVal = Ctrl2.DrawWidth
  409.     Ctrl2.AutoRedraw = True
  410.     Cleft% = Ctrl1.Left - 20
  411.     CTop% = Ctrl1.Top - 20
  412.     Cwide% = Ctrl1.Width + 25
  413.     Chigh% = Ctrl1.Height + 25
  414.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  415.     Ctrl2.Line -Step(0, Chigh%), GRAY
  416.     Ctrl2.Line -Step(-Cwide%, 0), GRAY
  417.     Ctrl2.Line -Step(0, -Chigh%), WHITE
  418.     Cleft% = Ctrl1.Left - 35
  419.     CTop% = Ctrl1.Top - 35
  420.     Cwide% = Ctrl1.Width + 60
  421.     Chigh% = Ctrl1.Height + 60
  422.     Ctrl2.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  423.     Ctrl2.Line -Step(0, Chigh%), GRAY
  424.     Ctrl2.Line -Step(-Cwide%, 0), GRAY
  425.     Ctrl2.Line -Step(0, -Chigh%), WHITE
  426.     Ctrl2.DrawWidth = OldDWVal
  427. End Sub     ' RaisedBorderBox()
  428.  
  429. Sub RaisedFormEdge (Ctrl1 As Form)
  430.     OldDWVal = Ctrl1.DrawWidth
  431.     Ctrl1.DrawWidth = 1
  432.     Cleft% = Ctrl1.ScaleLeft + 20
  433.     CTop% = Ctrl1.ScaleTop + 20
  434.     Cwide% = Ctrl1.ScaleWidth - 60
  435.     Chigh% = Ctrl1.ScaleHeight - 60
  436.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  437.     Ctrl1.Line -Step(0, Chigh%), WHITE
  438.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  439.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  440.     Cleft% = Ctrl1.ScaleLeft
  441.     CTop% = Ctrl1.ScaleTop
  442.     Cwide% = Ctrl1.ScaleWidth - 20
  443.     Chigh% = Ctrl1.ScaleHeight - 20
  444.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  445.     Ctrl1.Line -Step(0, Chigh%), GRAY
  446.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  447.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  448.     Ctrl1.DrawWidth = OldDWVal
  449. End Sub     ' RaisedFormEdge()
  450.  
  451. Sub RaisedFrmText (Ctrl1 As Form, Text$, Xpos%, Ypos%, ColorVal)
  452.     OldDWVal = Ctrl1.DrawWidth
  453.     Ctrl1.AutoRedraw = True
  454.     StartColor = Ctrl1.ForeColor
  455.     Ctrl1.CurrentX = Xpos% - 15
  456.     Ctrl1.CurrentY = Ypos% - 15
  457.     Ctrl1.ForeColor = WHITE
  458.     Ctrl1.Print Text$
  459.     Ctrl1.CurrentX = Xpos% + 15
  460.     Ctrl1.CurrentY = Ypos% + 15
  461.     Ctrl1.ForeColor = GRAY
  462.     Ctrl1.Print Text$
  463.     Ctrl1.CurrentX = Xpos%
  464.     Ctrl1.CurrentY = Ypos%
  465.     Ctrl1.ForeColor = ColorVal
  466.     Ctrl1.Print Text$
  467.     Ctrl1.ForeColor = StartColor
  468.     Ctrl1.DrawWidth = OldDWVal
  469. End Sub     ' RaisedFrmText()
  470.  
  471. Sub RaisedPicBorder (Ctrl1 As Control, Height%)
  472.     OldDWVal = Ctrl1.DrawWidth
  473.     Ctrl1.DrawWidth = 1
  474.     Cleft% = Ctrl1.ScaleLeft
  475.     CTop% = Ctrl1.ScaleTop
  476.     Cwide% = Ctrl1.ScaleWidth - 15
  477.     Chigh% = Ctrl1.ScaleHeight - 15
  478.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  479.     Ctrl1.Line -Step(0, Chigh%), GRAY
  480.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  481.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  482.     If Height% = 2 Then
  483.         Cleft% = Ctrl1.ScaleLeft + 15
  484.         CTop% = Ctrl1.ScaleTop + 15
  485.         Cwide% = Ctrl1.ScaleWidth - 45
  486.         Chigh% = Ctrl1.ScaleHeight - 45
  487.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  488.         Ctrl1.Line -Step(0, Chigh%), GRAY
  489.         Ctrl1.Line -Step(-Cwide%, 0), GRAY
  490.         Ctrl1.Line -Step(0, -Chigh%), WHITE
  491.     End If
  492.     Ctrl1.DrawWidth = OldDWVal
  493. End Sub     ' RaisedPicBorder()
  494.  
  495. Sub RaisedPicEdge (Ctrl1 As Control)
  496.     OldDWVal = Ctrl1.DrawWidth
  497.     Ctrl1.DrawWidth = 1
  498.     Cleft% = Ctrl1.ScaleLeft + 10
  499.     CTop% = Ctrl1.ScaleTop + 10
  500.     Cwide% = Ctrl1.ScaleWidth - 45
  501.     Chigh% = Ctrl1.ScaleHeight - 40
  502.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  503.     Ctrl1.Line -Step(0, Chigh%), WHITE
  504.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  505.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  506.     Cleft% = Ctrl1.ScaleLeft
  507.     CTop% = Ctrl1.ScaleTop
  508.     Cwide% = Ctrl1.ScaleWidth - 15
  509.     Chigh% = Ctrl1.ScaleHeight - 15
  510.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  511.     Ctrl1.Line -Step(0, Chigh%), GRAY
  512.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  513.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  514.     Ctrl1.DrawWidth = OldDWVal
  515. End Sub     ' RaisedPicEdge()
  516.  
  517. Sub RaisedPicText (Ctrl1 As Control, Text$, Xpos%, Ypos%, ColorVal)
  518.     OldDWVal = Ctrl1.DrawWidth
  519.     Ctrl1.DrawWidth = 1
  520.     StartColor = Ctrl1.ForeColor
  521.     Ctrl1.CurrentX = Xpos% - 15
  522.     Ctrl1.CurrentY = Ypos% - 15
  523.     Ctrl1.ForeColor = WHITE
  524.     Ctrl1.Print Text$
  525.     Ctrl1.CurrentX = Xpos% + 15
  526.     Ctrl1.CurrentY = Ypos% + 15
  527.     Ctrl1.ForeColor = GRAY
  528.     Ctrl1.Print Text$
  529.     Ctrl1.CurrentX = Xpos%
  530.     Ctrl1.CurrentY = Ypos%
  531.     Ctrl1.ForeColor = ColorVal
  532.     Ctrl1.Print Text$
  533.     Ctrl1.ForeColor = StartColor
  534.     Ctrl1.DrawWidth = OldDWVal
  535. End Sub     ' RaisedPicText()
  536.  
  537. Sub ShadowFormFrame (Ctrl1 As Form)
  538.     OldDWVal = Ctrl1.DrawWidth
  539.     Ctrl1.DrawWidth = 1
  540.     Cleft% = Ctrl1.ScaleLeft + 60
  541.     CTop% = Ctrl1.ScaleTop + 60
  542.     Cwide% = Ctrl1.ScaleWidth - 130
  543.     Chigh% = Ctrl1.ScaleHeight - 130
  544.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  545.     Ctrl1.Line -Step(0, Chigh%), GRAY
  546.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  547.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  548.     Cleft% = Ctrl1.ScaleLeft
  549.     CTop% = Ctrl1.ScaleTop
  550.     Cwide% = Ctrl1.ScaleWidth - 10
  551.     Chigh% = Ctrl1.ScaleHeight - 10
  552.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  553.     Ctrl1.Line -Step(0, Chigh%), WHITE
  554.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  555.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  556.     Ctrl1.DrawWidth = OldDWVal
  557. End Sub     ' ShadowFormFrame()
  558.  
  559. Sub ShadowPicBorder (Ctrl1 As Control, Depth%)
  560.     OldDWVal = Ctrl1.DrawWidth
  561.     Ctrl1.DrawWidth = 1
  562.     Cleft% = Ctrl1.ScaleLeft
  563.     CTop% = Ctrl1.ScaleTop
  564.     Cwide% = Ctrl1.ScaleWidth - 15
  565.     Chigh% = Ctrl1.ScaleHeight - 15
  566.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  567.     Ctrl1.Line -Step(0, Chigh%), WHITE
  568.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  569.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  570.     If Depth% = 2 Then
  571.         Cleft% = Ctrl1.ScaleLeft + 15
  572.         CTop% = Ctrl1.ScaleTop + 15
  573.         Cwide% = Ctrl1.ScaleWidth - 45
  574.         Chigh% = Ctrl1.ScaleHeight - 45
  575.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  576.         Ctrl1.Line -Step(0, Chigh%), WHITE
  577.         Ctrl1.Line -Step(-Cwide%, 0), WHITE
  578.         Ctrl1.Line -Step(0, -Chigh%), GRAY
  579.     End If
  580.     Ctrl1.DrawWidth = OldDWVal
  581. End Sub     ' ShadowPicBorder()
  582.  
  583. Sub ShadowPicFrame (Ctrl1 As Control, Depth%)
  584.     OldDWVal = Ctrl1.DrawWidth
  585.     Ctrl1.AutoRedraw = True
  586.     Cleft% = Ctrl1.ScaleLeft + 60
  587.     CTop% = Ctrl1.ScaleTop + 60
  588.     Cwide% = Ctrl1.ScaleWidth - 145
  589.     Chigh% = Ctrl1.ScaleHeight - 145
  590.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  591.     Ctrl1.Line -Step(0, Chigh%), GRAY
  592.     Ctrl1.Line -Step(-Cwide%, 0), GRAY
  593.     Ctrl1.Line -Step(0, -Chigh%), WHITE
  594.     Cleft% = Ctrl1.ScaleLeft
  595.     CTop% = Ctrl1.ScaleTop
  596.     Cwide% = Ctrl1.ScaleWidth - 15
  597.     Chigh% = Ctrl1.ScaleHeight - 15
  598.     Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  599.     Ctrl1.Line -Step(0, Chigh%), WHITE
  600.     Ctrl1.Line -Step(-Cwide%, 0), WHITE
  601.     Ctrl1.Line -Step(0, -Chigh%), GRAY
  602.     If Depth% = 2 Then
  603.         Cleft% = Ctrl1.ScaleLeft + 15
  604.         CTop% = Ctrl1.ScaleTop + 15
  605.         Cwide% = Ctrl1.ScaleWidth - 35
  606.         Chigh% = Ctrl1.ScaleHeight - 35
  607.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), GRAY
  608.         Ctrl1.Line -Step(0, Chigh%), WHITE
  609.         Ctrl1.Line -Step(-Cwide%, 0), WHITE
  610.         Ctrl1.Line -Step(0, -Chigh%), GRAY
  611.         Cleft% = Ctrl1.ScaleLeft + 75
  612.         CTop% = Ctrl1.ScaleTop + 75
  613.         Cwide% = Ctrl1.ScaleWidth - 175
  614.         Chigh% = Ctrl1.ScaleHeight - 175
  615.         Ctrl1.Line (Cleft%, CTop%)-Step(Cwide%, 0), WHITE
  616.         Ctrl1.Line -Step(0, Chigh%), GRAY
  617.         Ctrl1.Line -Step(-Cwide%, 0), GRAY
  618.         Ctrl1.Line -Step(0, -Chigh%), WHITE
  619.     End If
  620.     Ctrl1.DrawWidth = OldDWVal
  621. End Sub     ' ShadowPicFrame()
  622.  
  623.