home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD56675102000.psc / Config.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-05-10  |  7.0 KB  |  229 lines

  1. VERSION 5.00
  2. Begin VB.Form Config 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Options"
  5.    ClientHeight    =   2775
  6.    ClientLeft      =   45
  7.    ClientTop       =   285
  8.    ClientWidth     =   3615
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   2775
  12.    ScaleWidth      =   3615
  13.    ShowInTaskbar   =   0   'False
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.ComboBox OP 
  16.       Height          =   315
  17.       Index           =   5
  18.       Left            =   2520
  19.       TabIndex        =   12
  20.       Text            =   "OP"
  21.       Top             =   1920
  22.       Width           =   975
  23.    End
  24.    Begin VB.ComboBox OP 
  25.       Height          =   315
  26.       Index           =   4
  27.       Left            =   2520
  28.       TabIndex        =   11
  29.       Text            =   "OP"
  30.       Top             =   1560
  31.       Width           =   975
  32.    End
  33.    Begin VB.ComboBox OP 
  34.       Height          =   315
  35.       Index           =   3
  36.       Left            =   2520
  37.       TabIndex        =   10
  38.       Text            =   "OP"
  39.       Top             =   1200
  40.       Width           =   975
  41.    End
  42.    Begin VB.ComboBox OP 
  43.       Height          =   315
  44.       Index           =   2
  45.       Left            =   2520
  46.       TabIndex        =   9
  47.       Text            =   "OP"
  48.       Top             =   840
  49.       Width           =   975
  50.    End
  51.    Begin VB.ComboBox OP 
  52.       Height          =   315
  53.       Index           =   1
  54.       Left            =   2520
  55.       TabIndex        =   8
  56.       Text            =   "OP"
  57.       Top             =   480
  58.       Width           =   975
  59.    End
  60.    Begin VB.ComboBox OP 
  61.       Height          =   315
  62.       Index           =   0
  63.       Left            =   2520
  64.       TabIndex        =   7
  65.       Text            =   "OP"
  66.       Top             =   120
  67.       Width           =   975
  68.    End
  69.    Begin VB.CommandButton OK 
  70.       Caption         =   "OK"
  71.       Height          =   255
  72.       Left            =   120
  73.       TabIndex        =   6
  74.       Top             =   2400
  75.       Width           =   3375
  76.    End
  77.    Begin VB.Line Line1 
  78.       BorderColor     =   &H00E0E0E0&
  79.       Index           =   1
  80.       X1              =   120
  81.       X2              =   3480
  82.       Y1              =   2290
  83.       Y2              =   2290
  84.    End
  85.    Begin VB.Line Line1 
  86.       BorderColor     =   &H00808080&
  87.       Index           =   0
  88.       X1              =   120
  89.       X2              =   3480
  90.       Y1              =   2280
  91.       Y2              =   2280
  92.    End
  93.    Begin VB.Label Label6 
  94.       Caption         =   "Rotation Speed:"
  95.       Height          =   255
  96.       Left            =   120
  97.       TabIndex        =   5
  98.       Top             =   1920
  99.       Width           =   2295
  100.    End
  101.    Begin VB.Label Label5 
  102.       Caption         =   "Dot Degree Interval:"
  103.       Height          =   255
  104.       Left            =   120
  105.       TabIndex        =   4
  106.       Top             =   1560
  107.       Width           =   2295
  108.    End
  109.    Begin VB.Label Label4 
  110.       Caption         =   "Circle Expansion Maximum:"
  111.       Height          =   255
  112.       Left            =   120
  113.       TabIndex        =   3
  114.       Top             =   1200
  115.       Width           =   2295
  116.    End
  117.    Begin VB.Label Label3 
  118.       Caption         =   "Circle Expansion Minimum:"
  119.       Height          =   255
  120.       Left            =   120
  121.       TabIndex        =   2
  122.       Top             =   840
  123.       Width           =   2295
  124.    End
  125.    Begin VB.Label Label2 
  126.       Caption         =   "Max Circle Amount:"
  127.       Height          =   255
  128.       Left            =   120
  129.       TabIndex        =   1
  130.       Top             =   480
  131.       Width           =   2295
  132.    End
  133.    Begin VB.Label Label1 
  134.       Caption         =   "Circle Amount Change Interval:"
  135.       Height          =   255
  136.       Left            =   120
  137.       TabIndex        =   0
  138.       Top             =   120
  139.       Width           =   2295
  140.    End
  141. Attribute VB_Name = "Config"
  142. Attribute VB_GlobalNameSpace = False
  143. Attribute VB_Creatable = False
  144. Attribute VB_PredeclaredId = True
  145. Attribute VB_Exposed = False
  146. '+-----------------------------------------------+
  147. '|         ***Source Code Information***         |
  148. '|                                               |
  149. '|Author:    InfraRed                            |
  150. '|                                               |
  151. '|E-Mail:    InfraRed@flashmail.com              |
  152. '|                                               |
  153. '|ICQ UIN:   17948286                            |
  154. '|                                               |
  155. '|Comments:  I hope you enjoy my source code.  I |
  156. '|worked very hard on this, and if you use       |
  157. '|anything from here, I would like to get credit |
  158. '|for it.  If it makes you feel any better, you  |
  159. '|can e-mail/ICQ me and ask permission to use my |
  160. '|source code...  BUT you don't have to!  If you |
  161. '|have any complaints, compliments, comments,    |
  162. '|threats, fan mail, junk mail, hate mail, or    |
  163. '|anything else you can think of, go ahead and   |
  164. '|send.                                          |
  165. '|                                               |
  166. '|              ***Enjoy my code!***             |
  167. '+-----------------------------------------------+
  168. Private Sub Form_Load() 'Prepare all of the values
  169. LoadValues
  170. LoadRegValues
  171. End Sub
  172. Public Sub LoadValues() 'Add all of the numbers to the combo boxes
  173. Dim i As Integer
  174. For i = 1 To 60
  175. OP(0).AddItem i
  176. Next i
  177. For i = 1 To 10
  178. OP(1).AddItem i
  179. Next i
  180. For i = 1 To 500
  181. OP(2).AddItem i
  182. Next i
  183. For i = 500 To 5000
  184. OP(3).AddItem i
  185. Next i
  186. For i = 1 To 6
  187. OP(4).AddItem i
  188. Next i
  189. For i = 8 To 10
  190. OP(4).AddItem i
  191. Next i
  192. OP(4).AddItem 12
  193. OP(4).AddItem 18
  194. OP(4).AddItem 36
  195. For i = 0 To 5
  196. OP(5).AddItem i
  197. Next i
  198. End Sub
  199. Public Sub LoadRegValues() 'Load current registry values (options), self explanitory
  200. OP(0).Text = GetSetting("Cyclone", "OP", "0", "30")
  201. OP(1).Text = GetSetting("Cyclone", "OP", "1", "5")
  202. OP(2).Text = GetSetting("Cyclone", "OP", "2", "500")
  203. OP(3).Text = GetSetting("Cyclone", "OP", "3", "3000")
  204. OP(4).Text = GetSetting("Cyclone", "OP", "4", "6")
  205. OP(5).Text = GetSetting("Cyclone", "OP", "5", "3")
  206. End Sub
  207. Public Sub SaveRegValues() 'Save all registry values, self explanitory
  208. Call SaveSetting("Cyclone", "OP", "0", OP(0).Text)
  209. Call SaveSetting("Cyclone", "OP", "1", OP(1).Text)
  210. Call SaveSetting("Cyclone", "OP", "2", OP(2).Text)
  211. Call SaveSetting("Cyclone", "OP", "3", OP(3).Text)
  212. Call SaveSetting("Cyclone", "OP", "4", OP(4).Text)
  213. Call SaveSetting("Cyclone", "OP", "5", OP(5).Text)
  214. End Sub
  215. Private Sub OK_Click() 'Save registry values and unload configuration screen
  216. SaveRegValues
  217. Unload Me
  218. End Sub
  219. Private Sub OP_Change(Index As Integer) 'Checks if the typed value is one of the values in combo box, if not, set the combo box text to nothing
  220. Dim i As Integer, Yes As Boolean
  221. For i = 0 To OP(Index).ListCount
  222.   If OP(Index).List(i) = OP(Index).Text Then
  223.   Yes = True
  224.   Exit For
  225.   End If
  226. Next i
  227.     If Yes = False Then OP(Index).Text = ""
  228. End Sub
  229.