My mainform is a MdiParent.
On there i use for example 2 forms.
If both are on the mainform, i want that one of the forms checks if the other form is open and if this is the case he must send an update.
Sofar i have this in the first form:
Expand|Select|Wrap|Line Numbers
- 'If the form 'FinishRepair' is open, send update for the iriscode
- Dim frm As Form
- For Each frm In My.Application.OpenForms
- If (frm.Name Is "FinishRepair") Then
- 'Do something
- End If
- Next
Expand|Select|Wrap|Line Numbers
- Public Sub LoadIrisCode()
- Dim Query As String
- Dim Table As New DataTable
- Dim i As Integer
- IrisID.Clear()
- Query = "SELECT * FROM iris_code ORDER BY code"
- Table = SelectQuery(Query)
- While i <> Table.Rows.Count
- IrisID.Add(Table.Rows(i).Item("id"))
- CmbIrisCode.Items.Add(Table.Rows(i).Item("code"))
- i = i + 1
- End While
- Table = Nothing
- End Sub
What is the best possible way? Add a public property or....?
Thanks,
Paul