CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2001
    Posts
    2

    How to get a nice transition between forms ?

    Hi all,

    From one frame, I "load" another one and then use "show vbmodal" to activate it.

    Some of the buttons of the second form appear straight away, but the rest of the form gets visible only after one or two more seconds, sometimes more depending on the form...

    Why this stupid behaviour that makes the program very annoying to use ?




  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: How to get a nice transition between forms ?

    In the form that is to be displayed, set the visible property of the form to visible in it's load event. Then call doevents


    private Sub Form_Load()
    me.visible = true
    DoEvents
    End Sub




    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Apr 2001
    Posts
    2

    Re: How to get a nice transition between forms ?

    In the form that is to be displayed, set the visible property of the form to visible in it's load event. Then call doevents


    private Sub Form_Load() me.visible = true DoEventsEnd Sub


    Thanks for this answer. It seems to be a good step towards the solution.
    Unfortunately, it is not the solution...yet...

    The Doevents allowed me to get rid of the bad "button behaviour". Now the form appears in just one shot (though I don't really understand what Doevents does...)

    My new problem is that I use Form_Load and Form_Activate to update the form everytime that it is needed. For example, I update a few captions before showing the forms... The user should not see these caption updates, but he does, because the form is first shown, then modified...

    On top of that, I often the new modal form from another modal form, which prevents me from using the visible property as much as I would like... (not allowed...)

    Any help ? Explaining the theory might help me better understand what is going on...

    Thanks in advance.





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

Featured