home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jpi / libedit.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-01-01  |  4.0 KB  |  139 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Graphics Library Editor"
  5.    ClientHeight    =   1740
  6.    ClientLeft      =   2565
  7.    ClientTop       =   3600
  8.    ClientWidth     =   4215
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   1740
  13.    ScaleWidth      =   4215
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.CheckBox Check1 
  16.       Caption         =   "Masked"
  17.       Height          =   255
  18.       Left            =   2040
  19.       TabIndex        =   7
  20.       Top             =   1320
  21.       Width           =   2055
  22.    End
  23.    Begin VB.CommandButton Command2 
  24.       Caption         =   "Revert"
  25.       Height          =   315
  26.       Left            =   1080
  27.       TabIndex        =   6
  28.       Top             =   1320
  29.       Width           =   855
  30.    End
  31.    Begin VB.CommandButton Command1 
  32.       Caption         =   "Save"
  33.       Height          =   315
  34.       Left            =   120
  35.       TabIndex        =   5
  36.       Top             =   1320
  37.       Width           =   855
  38.    End
  39.    Begin VB.ListBox List1 
  40.       Height          =   1035
  41.       Left            =   2040
  42.       TabIndex        =   4
  43.       Top             =   120
  44.       Width           =   2055
  45.    End
  46.    Begin VB.TextBox Text2 
  47.       Height          =   285
  48.       Left            =   120
  49.       TabIndex        =   2
  50.       Text            =   "-Blank-"
  51.       Top             =   960
  52.       Width           =   1815
  53.    End
  54.    Begin VB.TextBox Text1 
  55.       Height          =   285
  56.       Left            =   120
  57.       TabIndex        =   0
  58.       Text            =   "-Blank-"
  59.       Top             =   360
  60.       Width           =   1815
  61.    End
  62.    Begin VB.Label Label2 
  63.       Caption         =   "Graphic File:"
  64.       Height          =   255
  65.       Left            =   120
  66.       TabIndex        =   3
  67.       Top             =   720
  68.       Width           =   1575
  69.    End
  70.    Begin VB.Label Label1 
  71.       Caption         =   "Library Name:"
  72.       Height          =   255
  73.       Left            =   120
  74.       TabIndex        =   1
  75.       Top             =   120
  76.       Width           =   1575
  77.    End
  78. Attribute VB_Name = "Form1"
  79. Attribute VB_GlobalNameSpace = False
  80. Attribute VB_Creatable = False
  81. Attribute VB_PredeclaredId = True
  82. Attribute VB_Exposed = False
  83. Private Sub Command1_Click()
  84. Call SaveFile
  85. End Sub
  86. Private Sub Command2_Click()
  87. Call LoadFile
  88. End Sub
  89. Private Sub Form_Load()
  90. Call LoadFile
  91. Form1.List1.AddItem "[NewLib]"
  92. Form1.List1.ListIndex = 0
  93. Call UpdateView
  94. End Sub
  95. Private Sub List1_Click()
  96. If List1.ListIndex = 0 Then
  97.   Text1.Text = "-Blank-"
  98.   Text2.Text = "-Blank-"
  99.   Text1.Text = GraphixLibs(List1.ListIndex).LibName
  100.   Text2.Text = GraphixLibs(List1.ListIndex).GraphicsFile
  101. End If
  102. End Sub
  103. Private Sub List1_KeyUp(KeyCode As Integer, Shift As Integer)
  104. If KeyCode = 46 Then 'escape
  105.   lastn = List1.ListIndex
  106.   For i = List1.ListIndex To 99
  107.     GraphixLibs(i).GraphicsFile = GraphixLibs(i + 1).GraphicsFile
  108.     GraphixLibs(i).LibName = GraphixLibs(i + 1).LibName
  109.   Next i
  110.   GraphixLibs(100).GraphicsFile = ""
  111.   GraphixLibs(100).LibName = ""
  112. MaxLibs = MaxLibs - 1
  113. List1.ListIndex = lastn - 1
  114. Call UpdateView
  115. End If
  116. End Sub
  117. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
  118. If List1.ListIndex = 0 Then
  119.   MaxLibs = MaxLibs + 1
  120.   GraphixLibs(MaxLibs).LibName = Text1.Text
  121.   GraphixLibs(MaxLibs).GraphicsFile = Text2.Text
  122.   Call UpdateView
  123.   List1.ListIndex = MaxLibs
  124.   GraphixLibs(List1.ListIndex).LibName = Text1.Text
  125.   Call UpdateView
  126. End If
  127. End Sub
  128. Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
  129. If List1.ListIndex = 0 Then
  130.   MaxLibs = MaxLibs + 1
  131.   GraphixLibs(MaxLibs).LibName = Text1.Text
  132.   GraphixLibs(MaxLibs).GraphicsFile = Text2.Text
  133.   Call UpdateView
  134.   List1.ListIndex = MaxLibs
  135.   GraphixLibs(List1.ListIndex).GraphicsFile = Text2.Text
  136.   Call UpdateView
  137. End If
  138. End Sub
  139.