home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_tools / vbabk / vba_ini.frm < prev    next >
Text File  |  1994-07-03  |  7KB  |  261 lines

  1. VERSION 2.00
  2. Begin Form VBA_Ini 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Ini Functions"
  5.    ClientHeight    =   2835
  6.    ClientLeft      =   825
  7.    ClientTop       =   2220
  8.    ClientWidth     =   7365
  9.    Height          =   3240
  10.    Left            =   765
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2835
  13.    ScaleWidth      =   7365
  14.    Top             =   1875
  15.    Width           =   7485
  16.    Begin OptionButton Option1 
  17.       Caption         =   "Ini Delete Section"
  18.       Height          =   255
  19.       Index           =   11
  20.       Left            =   4440
  21.       TabIndex        =   21
  22.       Top             =   2520
  23.       Width           =   2055
  24.    End
  25.    Begin OptionButton Option1 
  26.       Caption         =   "Win Ini Delete Section"
  27.       Height          =   255
  28.       Index           =   10
  29.       Left            =   4440
  30.       TabIndex        =   20
  31.       Top             =   2280
  32.       Width           =   2295
  33.    End
  34.    Begin OptionButton Option1 
  35.       Caption         =   "Ini Delete Entry"
  36.       Height          =   255
  37.       Index           =   9
  38.       Left            =   4440
  39.       TabIndex        =   19
  40.       Top             =   2040
  41.       Width           =   2055
  42.    End
  43.    Begin OptionButton Option1 
  44.       Caption         =   "Win Ini Delete Entry"
  45.       Height          =   255
  46.       Index           =   8
  47.       Left            =   4440
  48.       TabIndex        =   18
  49.       Top             =   1800
  50.       Width           =   2055
  51.    End
  52.    Begin OptionButton Option1 
  53.       Caption         =   "Ini Flush"
  54.       Height          =   255
  55.       Index           =   7
  56.       Left            =   2280
  57.       TabIndex        =   17
  58.       Top             =   2520
  59.       Width           =   2055
  60.    End
  61.    Begin OptionButton Option1 
  62.       Caption         =   "Win Ini Flush"
  63.       Height          =   255
  64.       Index           =   6
  65.       Left            =   2280
  66.       TabIndex        =   16
  67.       Top             =   2280
  68.       Width           =   2055
  69.    End
  70.    Begin OptionButton Option1 
  71.       Caption         =   "Ini Put"
  72.       Height          =   255
  73.       Index           =   5
  74.       Left            =   2280
  75.       TabIndex        =   15
  76.       Top             =   2040
  77.       Width           =   2055
  78.    End
  79.    Begin OptionButton Option1 
  80.       Caption         =   "Win Ini Put"
  81.       Height          =   255
  82.       Index           =   4
  83.       Left            =   2280
  84.       TabIndex        =   14
  85.       Top             =   1800
  86.       Width           =   2055
  87.    End
  88.    Begin OptionButton Option1 
  89.       Caption         =   "Ini Get All"
  90.       Height          =   255
  91.       Index           =   3
  92.       Left            =   120
  93.       TabIndex        =   13
  94.       Top             =   2520
  95.       Width           =   2055
  96.    End
  97.    Begin OptionButton Option1 
  98.       Caption         =   "Ini Get"
  99.       Height          =   255
  100.       Index           =   2
  101.       Left            =   120
  102.       TabIndex        =   12
  103.       Top             =   2280
  104.       Width           =   2055
  105.    End
  106.    Begin OptionButton Option1 
  107.       Caption         =   "Win Ini Get All"
  108.       Height          =   255
  109.       Index           =   1
  110.       Left            =   120
  111.       TabIndex        =   11
  112.       Top             =   2040
  113.       Width           =   2055
  114.    End
  115.    Begin OptionButton Option1 
  116.       Caption         =   "Win Ini Get"
  117.       Height          =   255
  118.       Index           =   0
  119.       Left            =   120
  120.       TabIndex        =   10
  121.       Top             =   1800
  122.       Width           =   2055
  123.    End
  124.    Begin TextBox IniValue 
  125.       Height          =   285
  126.       Left            =   5040
  127.       TabIndex        =   5
  128.       Text            =   "IniValue"
  129.       Top             =   1320
  130.       Width           =   2055
  131.    End
  132.    Begin TextBox IniEntry 
  133.       Height          =   285
  134.       Left            =   5040
  135.       TabIndex        =   4
  136.       Text            =   "Fonts"
  137.       Top             =   960
  138.       Width           =   2055
  139.    End
  140.    Begin TextBox IniSection 
  141.       Height          =   285
  142.       Left            =   5040
  143.       TabIndex        =   3
  144.       Text            =   "Fonts"
  145.       Top             =   600
  146.       Width           =   2055
  147.    End
  148.    Begin TextBox IniFileName 
  149.       Enabled         =   0   'False
  150.       Height          =   285
  151.       Left            =   5040
  152.       TabIndex        =   2
  153.       Text            =   "BKMA.Ini"
  154.       Top             =   240
  155.       Width           =   2055
  156.    End
  157.    Begin CheckBox WinIni 
  158.       Caption         =   "Win Ini"
  159.       Enabled         =   0   'False
  160.       Height          =   255
  161.       Left            =   3840
  162.       TabIndex        =   1
  163.       Top             =   240
  164.       Width           =   1095
  165.    End
  166.    Begin TextBox Section 
  167.       Height          =   1335
  168.       Left            =   120
  169.       ScrollBars      =   2  'Vertical
  170.       TabIndex        =   0
  171.       Text            =   "Ini Section"
  172.       Top             =   360
  173.       Width           =   3495
  174.    End
  175.    Begin Label Label2 
  176.       Caption         =   "Ini Viewer"
  177.       Height          =   255
  178.       Left            =   120
  179.       TabIndex        =   9
  180.       Top             =   120
  181.       Width           =   1935
  182.    End
  183.    Begin Label Label1 
  184.       Caption         =   "Value"
  185.       Height          =   255
  186.       Index           =   2
  187.       Left            =   3840
  188.       TabIndex        =   8
  189.       Top             =   1320
  190.       Width           =   855
  191.    End
  192.    Begin Label Label1 
  193.       Caption         =   "Entry"
  194.       Height          =   255
  195.       Index           =   1
  196.       Left            =   3840
  197.       TabIndex        =   7
  198.       Top             =   960
  199.       Width           =   855
  200.    End
  201.    Begin Label Label1 
  202.       Caption         =   "Section"
  203.       Height          =   255
  204.       Index           =   0
  205.       Left            =   3840
  206.       TabIndex        =   6
  207.       Top             =   600
  208.       Width           =   855
  209.    End
  210. End
  211. Sub IniFail ()
  212.     MsgBox "Unexpected error.", 16, "Failed to write"
  213.     IniSuccess
  214. End Sub
  215.  
  216. Sub IniSuccess ()
  217. End Sub
  218.  
  219. Sub Option1_Click (Index As Integer)
  220. WinIni = False
  221. Select Case Index
  222. Case 0
  223.     WinIni = 1
  224.     Section.Text = WinIniGet(iniSection, IniEntry)
  225.     
  226. Case 1
  227.     WinIni = 1
  228.     Section.Text = WinIniGetAll(iniSection)
  229.     
  230. Case 2
  231.     Section.Text = IniGet(iniSection, IniEntry, iniFilename)
  232. Case 3
  233.     Section.Text = IniGetAll(iniSection, iniFilename)
  234. Case 4
  235.     WinIni = 1
  236.     If WinIniPut(iniSection, IniEntry, iniValue) Then IniSuccess Else IniFail
  237.     
  238. Case 5
  239.     If IniPut(iniSection, IniEntry, iniValue, iniFilename) Then IniSuccess Else IniFail
  240.  
  241. Case 6
  242.     WinIni = 1
  243.     WinIniFlush
  244. Case 7
  245.     IniFlush iniFilename
  246. Case 8
  247.     WinIni = 1
  248.     WinIniDel iniSection, IniEntry
  249.     IniSuccess
  250. Case 9
  251.     IniDel iniSection, IniEntry, iniFilename
  252. Case 10
  253.     WinIni = 1
  254.     IniWinDelSect iniSection
  255. Case 11
  256.     IniDelSect iniSection, iniFilename
  257. End Select
  258.  
  259. End Sub
  260.  
  261.