home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / iniacces / form1.frm next >
Text File  |  1993-08-17  |  5KB  |  198 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4080
  5.    ClientLeft      =   924
  6.    ClientTop       =   1656
  7.    ClientWidth     =   6468
  8.    Height          =   4524
  9.    Left            =   864
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4080
  12.    ScaleWidth      =   6468
  13.    Top             =   1272
  14.    Width           =   6588
  15.    Begin TextBox txtDefault 
  16.       Height          =   288
  17.       Left            =   3840
  18.       TabIndex        =   12
  19.       Text            =   "Text1"
  20.       Top             =   3360
  21.       Width           =   2292
  22.    End
  23.    Begin TextBox txtText 
  24.       Height          =   288
  25.       Left            =   3840
  26.       TabIndex        =   7
  27.       Text            =   "value"
  28.       Top             =   2760
  29.       Width           =   2292
  30.    End
  31.    Begin TextBox txtEntry 
  32.       Height          =   288
  33.       Left            =   3840
  34.       TabIndex        =   6
  35.       Text            =   "myentry"
  36.       Top             =   2160
  37.       Width           =   2292
  38.    End
  39.    Begin TextBox txtSection 
  40.       Height          =   288
  41.       Left            =   3840
  42.       TabIndex        =   5
  43.       Text            =   "mysection"
  44.       Top             =   1560
  45.       Width           =   2292
  46.    End
  47.    Begin TextBox txtFilename 
  48.       Height          =   288
  49.       Left            =   3840
  50.       TabIndex        =   4
  51.       Text            =   "myfile.ini"
  52.       Top             =   960
  53.       Width           =   2292
  54.    End
  55.    Begin CommandButton Command4 
  56.       Caption         =   "Remove Section"
  57.       Height          =   492
  58.       Left            =   1080
  59.       TabIndex        =   3
  60.       Top             =   2880
  61.       Width           =   2172
  62.    End
  63.    Begin CommandButton Command3 
  64.       Caption         =   "Remove Entry"
  65.       Height          =   492
  66.       Left            =   1080
  67.       TabIndex        =   2
  68.       Top             =   2280
  69.       Width           =   2172
  70.    End
  71.    Begin CommandButton Command2 
  72.       Caption         =   "Read"
  73.       Height          =   492
  74.       Left            =   1080
  75.       TabIndex        =   1
  76.       Top             =   1680
  77.       Width           =   2172
  78.    End
  79.    Begin IniFile IniFile1 
  80.       Default         =   ""
  81.       Entry           =   "Test"
  82.       FileName        =   "wfd.ini"
  83.       Left            =   5760
  84.       Section         =   "test1"
  85.       Text            =   "IniFile1"
  86.       Top             =   360
  87.    End
  88.    Begin CommandButton Command1 
  89.       Caption         =   "Write"
  90.       Height          =   492
  91.       Left            =   1080
  92.       TabIndex        =   0
  93.       Top             =   1080
  94.       Width           =   2172
  95.    End
  96.    Begin Label Label1 
  97.       Caption         =   "Default"
  98.       Height          =   252
  99.       Index           =   4
  100.       Left            =   3840
  101.       TabIndex        =   13
  102.       Top             =   3120
  103.       Width           =   1692
  104.    End
  105.    Begin Label Label1 
  106.       Caption         =   "Text"
  107.       Height          =   252
  108.       Index           =   3
  109.       Left            =   3840
  110.       TabIndex        =   11
  111.       Top             =   2520
  112.       Width           =   1692
  113.    End
  114.    Begin Label Label1 
  115.       Caption         =   "Entry"
  116.       Height          =   252
  117.       Index           =   2
  118.       Left            =   3840
  119.       TabIndex        =   10
  120.       Top             =   1920
  121.       Width           =   1692
  122.    End
  123.    Begin Label Label1 
  124.       Caption         =   "Section"
  125.       Height          =   252
  126.       Index           =   1
  127.       Left            =   3840
  128.       TabIndex        =   9
  129.       Top             =   1320
  130.       Width           =   1692
  131.    End
  132.    Begin Label Label1 
  133.       Caption         =   "Filename"
  134.       Height          =   252
  135.       Index           =   0
  136.       Left            =   3840
  137.       TabIndex        =   8
  138.       Top             =   720
  139.       Width           =   1692
  140.    End
  141. End
  142. Option Explicit
  143.  
  144. Sub Command1_Click ()
  145.     
  146.     inifile1.Default = txtDefault.Text
  147.     inifile1.Entry = txtEntry.Text
  148.     inifile1.FileName = txtFilename.Text
  149.     inifile1.Section = txtSection.Text
  150.     inifile1.Text = txtText.Text
  151.     
  152.     inifile1.Action = 1
  153.  
  154.     MsgBox inifile1.Action
  155. End Sub
  156.  
  157. Sub Command2_Click ()
  158.     inifile1.Default = txtDefault.Text
  159.     inifile1.Entry = txtEntry.Text
  160.     inifile1.FileName = txtFilename.Text
  161.     inifile1.Section = txtSection.Text
  162.     inifile1.Text = ""
  163.     
  164.     inifile1.Action = 2
  165.     
  166.     MsgBox inifile1.Action
  167.     
  168.     txtText.Text = inifile1.Text
  169.  
  170. End Sub
  171.  
  172. Sub Command3_Click ()
  173.     inifile1.Default = txtDefault.Text
  174.     inifile1.Entry = txtEntry.Text
  175.     inifile1.FileName = txtFilename.Text
  176.     inifile1.Section = txtSection.Text
  177.     inifile1.Text = txtText.Text
  178.     
  179.     inifile1.Action = 3
  180.     
  181.     MsgBox inifile1.Action
  182.     
  183. End Sub
  184.  
  185. Sub Command4_Click ()
  186.     inifile1.Default = txtDefault.Text
  187.     inifile1.Entry = txtEntry.Text
  188.     inifile1.FileName = txtFilename.Text
  189.     inifile1.Section = txtSection.Text
  190.     inifile1.Text = txtText.Text
  191.     
  192.     inifile1.Action = 4
  193.     
  194.     MsgBox inifile1.Action
  195.  
  196. End Sub
  197.  
  198.