VERSION 5.00 Begin VB.UserControl usrcntSquare BackColor = &H8000000C& ClientHeight = 2820 ClientLeft = 0 ClientTop = 0 ClientWidth = 2820 ScaleHeight = 2820 ScaleWidth = 2820 Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 0 Left = 0 TabIndex = 0 Top = 0 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 1 Left = 960 TabIndex = 1 Top = 0 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 2 Left = 1920 TabIndex = 2 Top = 0 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 3 Left = 0 TabIndex = 3 Top = 960 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 4 Left = 960 TabIndex = 4 Top = 960 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 5 Left = 1920 TabIndex = 5 Top = 960 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 6 Left = 0 TabIndex = 6 Top = 1920 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 7 Left = 960 TabIndex = 7 Top = 1920 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End Begin SuDoKu.usrcntBlock usrcntSquare Height = 915 Index = 8 Left = 1920 TabIndex = 8 Top = 1920 Width = 915 _ExtentX = 1614 _ExtentY = 1614 End End Attribute VB_Name = "usrcntSquare" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = False Option Explicit '---------------------------------------------------------- ' Written 12/2006 by Keith Oxenrider ' Use at your own risk! ' No warrenty expressed or implied! '---------------------------------------------------------- Public Event Click(ByVal squareIndex As Integer, ByVal btnIndex As Integer, ByVal setIt As Boolean) Public Sub Clear() Dim i As Integer For i = 0 To 8 usrcntSquare(i).Clear Next i End Sub Public Sub fixIt(fixIt As Boolean) Dim i As Integer For i = 0 To 8 usrcntSquare(i).fixIt fixIt Next i End Sub Public Sub SetCol(ByVal col As Integer, ByVal btnIndex As Integer, ByVal setIt As Boolean) If col = 0 Then usrcntSquare(0).setIt btnIndex, setIt usrcntSquare(3).setIt btnIndex, setIt usrcntSquare(6).setIt btnIndex, setIt End If If col = 1 Then usrcntSquare(1).setIt btnIndex, setIt usrcntSquare(4).setIt btnIndex, setIt usrcntSquare(7).setIt btnIndex, setIt End If If col = 2 Then usrcntSquare(2).setIt btnIndex, setIt usrcntSquare(5).setIt btnIndex, setIt usrcntSquare(8).setIt btnIndex, setIt End If End Sub Public Sub SetRow(ByVal row As Integer, ByVal btnIndex As Integer, ByVal setIt As Boolean) If row = 0 Then usrcntSquare(0).setIt btnIndex, setIt usrcntSquare(1).setIt btnIndex, setIt usrcntSquare(2).setIt btnIndex, setIt End If If row = 1 Then usrcntSquare(3).setIt btnIndex, setIt usrcntSquare(4).setIt btnIndex, setIt usrcntSquare(5).setIt btnIndex, setIt End If If row = 2 Then usrcntSquare(6).setIt btnIndex, setIt usrcntSquare(7).setIt btnIndex, setIt usrcntSquare(8).setIt btnIndex, setIt End If End Sub Private Sub usrcntSquare_Click(index As Integer, ByVal btnIndex As Integer, ByVal setIt As Boolean) Dim i As Integer For i = 0 To index - 1 usrcntSquare(i).setIt btnIndex, setIt Next i For i = index + 1 To 8 usrcntSquare(i).setIt btnIndex, setIt Next i RaiseEvent Click(index, btnIndex, setIt) End Sub