Results 1 to 3 of 3

Thread: Switching between forms using .Show

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2003
    Location
    Cleveland, OH
    Posts
    41

    Question Switching between forms using .Show

    I am using .Show and .Hide to switch between multiple forms. This technique is not effective when you return to a form (using .Show) that contains data that has changed since you last .Showed the form, because the form does not display the latest changes. I need a better method of switching between forms that contain dynamic data, or a techneque for automatially refreshing a form since the load routine is skipped when .Showing a form.

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    Obviously you have to write your own code for RefreshControls, but you will already have this code in the Load event of the form.

    Does this help?

    Tris.

    VB Code:
    1. Private Sub Form1_VisibleChanged(ByVal sender As Object, _
    2.                                        ByVal e As System.EventArgs) _
    3.                                                 Handles MyBase.VisibleChanged
    4.         If Visible Then
    5.             RefreshControls()
    6.         End If
    7.     End Sub
    This world is not my home. I'm just passing through.

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2003
    Location
    Cleveland, OH
    Posts
    41
    That did the job quite nicely...just what I was looking for.

    Thanks, Tris!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width