|
All; I have a simple form with one button and one label. Inside my form I have the following: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = "Button1" End Sub Work just fine as one would expect. I then add a public module to the application as: Module FillIt Public Sub clickedit() Form1.Label1.Text = "Module Clicked" End Sub End Module I change the button_click on form1 to say: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FillIt.clickedit() End Sub Again, it works correctly. Now, I add a second module called start as below: Module start Public form1 As New Form1 Public Sub main() Form1.ShowDialog() End Sub End Module I change the project to have its startup object be start. when I run the app and click the button, nothing happens. A breakpoint shows that the module is accessed and the line of code to change the label's text is executed, but the form1 label's text does not change. It is as if I cannot "push" the change from the module to the form. Any thoughts as to what I am missing?? Thanks. John Ferry |