VERSION 5.00 Begin VB.Form frmArrays BorderStyle = 3 'Fixed Dialog Caption = " Edit Arrays" ClientHeight = 4380 ClientLeft = 45 ClientTop = 330 ClientWidth = 4320 Icon = "frmArrays.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 4380 ScaleWidth = 4320 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin VB.CommandButton cbDelArray DownPicture = "frmArrays.frx":08CA Enabled = 0 'False Height = 315 Left = 2595 Picture = "frmArrays.frx":09CC Style = 1 'Graphical TabIndex = 9 ToolTipText = "Delete Class" Top = 240 Width = 330 End Begin VB.CommandButton cbAddArray DownPicture = "frmArrays.frx":0ACE Height = 315 Left = 2235 Picture = "frmArrays.frx":0BD0 Style = 1 'Graphical TabIndex = 8 ToolTipText = "Create New Class" Top = 240 Width = 330 End Begin VB.CommandButton cbOK Caption = "&OK" BeginProperty Font Name = "Verdana" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 3210 TabIndex = 7 Top = 3930 Width = 1005 End Begin VB.TextBox txtArray Enabled = 0 'False Height = 1815 Left = 105 MultiLine = -1 'True TabIndex = 6 Top = 2040 Width = 4110 End Begin VB.OptionButton optArray Caption = "String" Enabled = 0 'False BeginProperty Font Name = "Verdana" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Index = 3 Left = 3285 TabIndex = 5 Top = 1320 Width = 1020 End Begin VB.OptionButton optArray Caption = "Table" Enabled = 0 'False BeginProperty Font Name = "Verdana" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Index = 2 Left = 2295 TabIndex = 4 Top = 1320 Width = 960 End Begin VB.OptionButton optArray Caption = "Word" Enabled = 0 'False BeginProperty Font Name = "Verdana" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Index = 1 Left = 3285 TabIndex = 3 Top = 960 Width = 885 End Begin VB.OptionButton optArray Caption = "Byte" Enabled = 0 'False BeginProperty Font Name = "Verdana" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Index = 0 Left = 2295 TabIndex = 2 Top = 945 Width = 870 End Begin VB.ListBox cbArrays Height = 1620 Left = 90 TabIndex = 0 Top = 255 Width = 2100 End Begin VB.Label lblArrays Caption = "Arrays" BeginProperty Font Name = "Verdana" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 180 Left = 120 TabIndex = 1 Top = 60 Width = 1125 End End Attribute VB_Name = "frmArrays" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub cbAddArray_Click() Dim newarray As String Dim lChar As Long Dim o As Integer GetWord: newarray = InputBox("Enter a name for the new array:", "New Array") If isBlank(newarray) Then Exit Sub ElseIf Len(newarray) > 32 Then MsgBox "Arrays can only be 32 characters in length.", vbCritical, "Add Array" GoTo GetWord ElseIf Not Left(newarray, 1) Like "[A-Za-z]" Then MsgBox "Array name must begin with a letter.", vbCritical, "New Array" GoTo GetWord Else For lChar = 1 To Len(newarray) If Not Mid(newarray, lChar, 1) Like "[0-9A-Za-z_]" Then MsgBox "Array name can only contain A-Z, a-z, _, or 0-9", vbCritical, "Add Array" GoTo GetWord End If Next lChar End If For o = 0 To 3 optArray(o).Enabled = True Next o txtArray.Enabled = True cbDelArray.Enabled = True inf.Modules("Main").Arrays.Add newarray, atBYTE_ARRAY, "" cbArrays.AddItem newarray cbArrays.ListIndex = cbArrays.NewIndex optArray(0).Value = True txtArray.Text = "" End Sub Private Sub cbArrays_Click() Dim o As Integer For o = 0 To 3 optArray(o).Enabled = True Next o txtArray.Enabled = True cbDelArray.Enabled = True optArray(inf.Modules("Main").Arrays(cbArrays.Text).AType).Value = True txtArray = inf.Modules("Main").Arrays(cbArrays.Text).Value End Sub Private Sub cbDelArray_Click() Dim yn As String Dim o As Integer yn = MsgBox("Do you really want to delete this array?", vbYesNoCancel, "Delete Array") If yn = vbYes Then cbDelArray.Enabled = False txtArray.Text = "" txtArray.Enabled = False For o = 0 To 3 optArray(o).Enabled = False Next o inf.Modules("Main").Arrays.Remove cbArrays.Text cbArrays.RemoveItem cbArrays.ListIndex End If End Sub Private Sub cbOk_Click() Unload Me End Sub Private Sub Form_Load() Dim ar As infArray For Each ar In inf.Modules("Main").Arrays cbArrays.AddItem ar.Name Next End Sub Private Sub optArray_Click(Index As Integer) inf.Modules("Main").Arrays(cbArrays.Text).AType = Index End Sub Private Sub txtArray_Change() inf.Modules("Main").Arrays(cbArrays.Text).Value = txtArray End Sub