I don't know about your code but the concept is :
declare a counter (as in the demo) and before showing the new form just attach that counter with it .Is this what you mean ?
Originally posted by Pirate I don't know about your code but the concept is :
declare a counter (as in the demo) and before showing the new form just attach that counter with it .Is this what you mean ?
Option Explicit On
Option Strict On
Module SharedCode
Friend fMdiParent As frnMdiParent
Friend Sub FileNew()
Dim pintFrmCounter As Integer = 0
Dim frmCurrent As New frmMdiChild()
With frmCurrent
.MdiParent = fMdiParent
pintFrmCounter += 1
.Text = "Machine " & pintFrmCounter
.Show()
End With
End Sub
End Module
Theirs the code, which as stands will open each new window with Machine 1, Machine 1, and so on
I know it should work if at least nothing goes wrong !
your code declares new variable with defalut value of "0" everytime you call the sub "FileNew" . So when you declare it outside the sub , it won't be affected how manytimes you call the sub . (I know how bad teach am I ) .
Actually, I still have no idea on how to get the totals from a random number of open windows (the values in a text box), store that number as a friend value type and then display that total in a seperate standard form.
Actually i guess my noobish was really comming out, but i meant from three text boxes -- like txtMoneyTotals from each child form and then displays the totals of those in a seperate form
Actually i guess my noobish was really comming out, but i meant from three text boxes -- like txtMoneyTotals from each child form and then displays the totals of those in a seperate form