VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Folder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

'Klasa Folder
'Rysuje folder wewnątrz kontrolki PictureBox
Private Pic As PictureBox
Private bColor As Long
Const w = 50, h = 30
Const Gray = vbWindowBackground '&H808080
'--------
Public Sub init(pc As PictureBox, bc As Long)
  Set Pic = pc
  bColor = bc
End Sub
'--------
Public Sub draw(X As Integer, Y As Integer, title As String)
  Pic.Line (X, Y)-(X + w, Y + h), bColor, BF
  Pic.Line (X, Y)-(X + w, Y + h), vbBlack, B
  Pic.Line (X + 1, Y + 1)-(X + w - 1, Y + 1), vbWhite
  Pic.Line (X + 1, Y)-(X + 1, Y + h), vbWhite
  Pic.Line (X + 5, Y)-(X + 15, Y - 5), bColor, BF
  Pic.Line (X + 5, Y)-(X + 15, Y - 5), vbBlack, B
  Pic.Line (X, Y + h - 1)-(X + w, Y + h - 1), Gray
  Pic.Line (X + w - 1, Y)-(X + w - 1, Y + h - 1), Gray
  Pic.PSet (X, Y + h + 5), Pic.BackColor
  Pic.Print title;
End Sub
