View Single Post
Old Sep 10th, 2005, 1:28 PM   #6
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
ShowDialog, instead of Show worked. Thanks. I have one last question about trying to communicate to the main form from the new form....

I have two forms

formMain
formFileNew

When you click the new button on formMain the formFileNew form comes up, when you click OK on formFileNew it needs to close itself (which works) and enable rtbTextBox on formMain, which doesnt work.

I cant figure out how to naviagate the code to the main form. Heres the code I tried in formFileNew to do this, which doesnt work:

    Private Sub cmdOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOk.Click
        Dim formMain As formMain
        formMain.rtbTextBox.Enabled = True
        Me.Close()
    End Sub

formMain.rtbTextBox.Enabled = True Fails and I get an error. Everything is spelled correct as well. Anyone know how to do this?
brokenhope is offline   Reply With Quote