VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Memento"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa Memento
Private x As Integer, y As Integer
Private w As Integer, h As Integer
Private rect As Rectangle
Private visRect As VisRectangle

Public Sub init(vrect As VisRectangle)
  'Przechowaj stan prostokąta
  Set visRect = vrect
  Set rect = vrect.rects
  x = rect.x
  y = rect.y
  w = rect.w
  h = rect.h
End Sub

Public Sub restore()
  'Odtwóz stan prostokąta
  rect.x = x
  rect.y = y
  rect.h = h
  rect.w = w
  Set visRect.rects = rect
End Sub
