Hello,
I have am opened form 'frmColours' with a timer on it, I can start the timer from the MDI but the code in the event timer_tick has no effect at all... it is executed but there is no effect...
Can you please tell me why and how can i change the caption of a label or any kind change using mdi or code in the tick event?
Thank you
MDI Code:
| 1 | Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click |
| 2 | |
| 3 | For Each f As Form In My.Application.OpenForms |
| 4 | If Not f.InvokeRequired Then |
| 5 | Select Case f.Name |
| 6 | Case "frmColour" |
| 7 | |
| 8 | 'f.Controls.Item("txtSearchDescription").Text = "test" |
| 9 | Dim objfrmx As New frmColour |
| 10 | objfrmx.Timer1.Enabled = True |
| 11 | objfrmx.txtSearchDescription.Text = "test" |
| 12 | |
| 13 | End Select |
| 14 | End If |
| 15 | Next |
| 16 | |
| 17 | end sub |
frmColour Code:
| Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick |
| btnList.Visible = True |
| txtSearchDescription.Text = "test" |
| End Sub |