parentchild1 - frmParent

 

Private Sub mnuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuExit.Click

End

End Sub

Private Sub mnuHorizon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuHorizon.Click

Me.LayoutMdi(MdiLayout.TileHorizontal)

End Sub

 

Private Sub mnuVert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuVert.Click

Me.LayoutMdi(MdiLayout.TileVertical)

End Sub

 

Private Sub mnuCascade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCascade.Click

Me.LayoutMdi(MdiLayout.Cascade)

End Sub

 

Private Sub mnuCreateChild1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCreateChild1.Click

Dim MyChild1 As New frmChild1

MyChild1.MdiParent = Me

MyChild1.Show()

End Sub

 

Private Sub mnuCreateChild2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCreateChild2.Click

Dim MyChild2 As New frmChild2

MyChild2.MdiParent = Me

MyChild2.Show()

End Sub

 

Private Sub mnuCreateChild3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCreateChild3.Click

Dim MyChild3 As New frmChild3

MyChild3.MdiParent = Me

MyChild3.Show()

End Sub

 

parentchild2

 

Private Sub mnuChildFst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuChildFst.Click

Dim MyChildFst As New frmChild2fst

MyChildFst.MdiParent = Me

MyChildFst.Show()

End Sub

 

Private Sub mnuChildSnd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuChildSnd.Click

Dim MyChildSnd As New frmChild2snd

MyChildSnd.MdiParent = Me

MyChildSnd.Show()

End Sub

 

parentchild3

 

Private Sub mnuChild_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuChild.Click

Dim MyChild As New frmChild3

MyChild.MdiParent = Me

MyChild.Show()

End Sub

 

Private Sub frmParent3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

FileOpen(1, "a:\studentz", OpenMode.Random, OpenAccess.Write, , Len(pranRec))

End Sub

 

Private Sub mnuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuExit.Click

FileClose(1)

'End

End Sub

 

Private Sub mnuProc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuProc.Click

 

End Sub

 

modRanFile

 

Module modRanFile

Public i As Integer

Public Structure ranFile

<VBFixedString(25)> Public StuName As String

<VBFixedString(25)> Public StuStAdr As String

<VBFixedString(20)> Public StuCity As String

<VBFixedString(2)> Public StuState As String

<VBFixedString(5)> Public StuZip As String

<VBFixedString(20)> Public StuMajor As String

End Structure

Public Const MAXUSERS = 100

Public pranFile(MAXUSERS) As ranFile

Public pranRec As ranFile

Public pintRecNum As Integer

End Module

 

frmChild3

 

Private Sub btnWrite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWrite.Click

i = i + 1

With pranFile(i)

.StuName = txtName.Text

.StuStAdr = txtStAdr.Text

.StuCity = txtCity.Text

.StuState = txtState.Text

.StuZip = txtZip.Text

.StuMajor = cboMajor.Text

End With

FilePut(1, pranFile(i), i)

End Sub