Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

Try adding a link to it like this:

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...