home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module1"
- Option Explicit
-
-
- Public Sub Draw3DRect(canvas As Object, x As Integer, y As Integer, w As Integer, h As Integer, fLowered As Boolean)
- Dim clrInnerTop As Long
- Dim clrOuterTop As Long
- Dim clrInnerBot As Long
- Dim clrOuterBot As Long
- Dim x1 As Integer
- Dim y1 As Integer
- Dim w1 As Integer
- Dim h1 As Integer
-
- x1 = x + Screen.TwipsPerPixelX
- y1 = y + Screen.TwipsPerPixelY
- w1 = w - 2 * Screen.TwipsPerPixelX
- h1 = h - 2 * Screen.TwipsPerPixelY
-
- If (fLowered) Then
- clrOuterBot = RGB(192, 192, 192)
- clrInnerBot = RGB(255, 255, 255)
- clrInnerTop = RGB(192, 192, 192)
- clrOuterTop = RGB(0, 0, 0)
- Else
- clrOuterBot = RGB(0, 0, 0)
- clrInnerBot = RGB(128, 128, 128)
- clrInnerTop = RGB(192, 192, 192)
- clrOuterTop = RGB(255, 255, 255)
- End If
-
- canvas.Line (x1, y1)-(x1 + w1, y1), clrInnerTop
- canvas.Line (x1, y1)-(x1, y1 + h1), clrInnerTop
- canvas.Line (x1 + w1, y1)-(x1 + w1, y1 + h1), clrInnerBot
- canvas.Line (x1 + w1, y1 + h1)-(x1, y1 + h1), clrInnerBot
-
- canvas.Line (x, y)-(x + w, y), clrOuterTop
- canvas.Line (x, y)-(x, y + h), clrOuterTop
- canvas.Line (x + w, y)-(x + w, y + h), clrOuterBot
- canvas.Line (x + w, y + h)-(x, y + h), clrOuterBot
- End Sub
-
-