unhide the form

shankar_it

Freshman
Joined
Jul 6, 2005
Messages
46
I have used Me.Hide() to hide a form and have opened new form on a click of the next button.This form has a back button and i am planing to close the present form on the click of the back button and unhide the prev form.

I just want to know if there is any way to unhide the hidden form.
 
Try adding a link to it like this:
Visual Basic:
Class FormLink 
    Inherits Form

    Dim lastform As FormLink

    Public Sub New(ByVal lastform As FormLink)
        ...

        Me.lastform = lastform

    End Sub

    ' Whatever you do to get forward
    Public Sub OnForward()

        Me.Hide()

        New FormLink(Me).Show()

    End Sub

    ' To get back to the previous form
    Public Sub OnBack()

         lastform.Show()

         Me.Close()

    End Sub

End Class

If you want to you should redesign the form to just chage its contents rather than opening up a new form each time.
 
Back
Top