Results 1 to 5 of 5

Thread: form doesn't show before long process

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    Post

    I am populating a listview with a 4000 records recordset on FORMLOAD. the thing is my form does not show before leaving the user with the impression that the system froze for about 7 seconds.
    Is there a way to show the form before populating the listview? I have tried populating on Form_Activate and also me.refresh before populating with no luck.


  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    I have similar programs, with alot of uploads at startup that seem like the machine has hung for a short period of time.

    I always use a 'Splash Screen' and a 'DoEvents' statement in the Startup procedure loop.

    For Example

    Create a new Module
    Create a Sub in the Module as follows

    Sub Main()
    Load frmSplash
    frmSplash.Show
    DoEvents

    'Main Loop here (Populate the 4000 entries)

    UnLoad frmSplash
    frmMain.Show
    End Sub

    Steve.

  3. #3
    Lively Member
    Join Date
    May 1999
    Location
    India
    Posts
    97

    Post

    Hi,
    Well here's one dirty way of doing it
    have your PopulateMyListView code written in a timer routine.

    enable this timer (with a interval of 1 sec) just before you exit the form_load routine.

    This would fire the timer event 1 sec after your form loads, and then the user would effectively see the listview filling up with its contents.

    The 1 sec. interval is ofcourse your prerogrative, u could run for milliseconds too

    hope this helps

    ------------------
    Gaurav Mahindra
    gmahindra@extentia.com



  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Try to move your code to Form_Activate event. It will show the form an then populate the ListView. Durring populating time you can provide the user with the Hourglass cursor, so he/she will know that the process is running.

    ------------------

    Serge

    Software Developer
    Serge_Dymkov@vertexinc.com
    Access8484@aol.com
    ICQ#: 51055819



    [This message has been edited by Serge (edited 11-24-1999).]

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    Post

    Thanks for your advice.... I had already tried it on Form_Activate and thought it didn't work but found out that I had some code in Form_Load that changed a value in a ComboBox and THAT trigered the populating of the list... hhehehe had to work a little there...

    Thanks...
    David Laplante

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