VERSION 5.00 Begin VB.Form Form1 Caption = "Parviz Bazgosha" ClientHeight = 5190 ClientLeft = 60 ClientTop = 450 ClientWidth = 7740 LinkTopic = "Form1" ScaleHeight = 5190 ScaleWidth = 7740 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command3 Caption = "Show All" Height = 495 Left = 5760 TabIndex = 3 Top = 1680 Width = 1575 End Begin VB.ListBox List1 Height = 4935 Left = 240 TabIndex = 2 Top = 120 Width = 5055 End Begin VB.CommandButton command2 Caption = "Show" Height = 495 Left = 5760 TabIndex = 1 Top = 1080 Width = 1575 End Begin VB.CommandButton Command1 Caption = "ADD" Height = 495 Left = 5760 TabIndex = 0 Top = 480 Width = 1575 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Type uname name As String * 20 grage As String * 4 End Type Private Sub Command1_Click() x = FreeFile() Open "c:\data.dat" For Random As x Len = 24 Dim c As uname c.name = InputBox("Enter name") c.grage = InputBox("Enter Gauge") Dim f As uname k = 0 Do While Not EOF(x) Get x, , f k = k + 1 Loop Put #x, k, c Close Close End Sub Private Sub command2_Click() List1.Clear Target = InputBox("Enter Record Name", "Enter Record Name") Open "c:\data.dat" For Random As 1 Len = 24 Dim x As uname Get #1, Target, x Close List1.AddItem ("Name: " & x.name & " Garge: " & x.grage) End Sub Private Sub Command3_Click() Dim geter As uname Open "c:\data.dat" For Random As #1 Len = 24 k = 0 Do While Not EOF(1) Get #1, , geter List1.AddItem ("name: " & geter.name & " garge:" & geter.grage) Loop List1.RemoveItem (List1.ListCount - 1) Close End Sub Private Sub Command4_Click() End Sub