Results 1 to 12 of 12

Thread: Form Loading..

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Form Loading..

    Code:
    If LoadData() = True Then
                 Call LoadSettings()
                 Call GetSettings()
                 If psteBUS_IsClosed = True Then
                     Dim frmSCR As New frmScreen
                     frmSCR.ShowDialog()                
                     frmSCR.Dispose()             
                 Else                 
                      Dim frmST As New frmStart                 
                      Dim frmLG As New frmLogin                   
                      frmST.ShowDialog()
                      frmLG.ShowDialog()
                      frmST.Dispose()
                      frmLG.Dispose()
     	     end if 
          MainMenu.ShowDialog()
    End If
    Here is my code.. My forms is a little bit slow in showing, how can i make it a little bit faster..

    MainMenu takes about 5-10 sec to load and the Mobile Screen display the default mobile screen it just look like the application has already ended. is it possible to display mainmenu the time the last form was disposed..
    Last edited by rothj0hn; Jan 6th, 2010 at 03:37 AM.

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Form Loading..

    Hey rothj0hn,

    I don't see any code. Did you forget an attachment?

    How slow are we talking about?

    Gary

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Form Loading..

    post updated..

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Form Loading..

    Hey,

    Can you provide some details as to what exactly is going on with each of those forms?

    Creating and disposing of forms in the compact framework is quite an intensive process. Some people argue that it is better to create one form, with a number of panels. Then where you would create a new form, you simply move the panel into view.

    Depending on what exactly you are trying to do, this may or may not be an option.

    Gary

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Form Loading..

    I agree with using 1 form and multiple panels. But sad to say that this application is already designed with multiple forms. So it will took burden of modification if i change the way it was designed just to solve that problem.

    Anyway.. The problem only exist whenever i load the mainmenu, maybe because there are lots of controls on it. The other forms that was just bean created and disposed are just for splash screen and user login. I just wonder if is there a way that load the mainmenu set it as hidden then ill just show it on to avoid delay.

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Form Loading..

    When you say MainMenu, are you talking about a form? To me, MainMenu would suggest a menu with different options the user can choose, i.e. File, Edit etc.

    Are there any long running processes happening on this forms load event? Have you tried tracing the application to find out what is taking a long time?

    Gary

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: Form Loading..

    MainMenu as MainForm.. Sorry for the Confusion. Yes it loads bunch of buttons that is generated during run time (classButtons), i think it causes the delay.

  8. #8
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Form Loading..

    Hey,

    As a verification of this, can you start taking portions of code out, or at least, put some log statements into various parts of the executing code? That will let you isolate what exactly is taking a long time to complete, and from there, you/we can start suggesting a method for improving this.

    Gary

  9. #9
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Form Loading..

    Hi,
    may be worth using the excellent Eqatec profiler

    Otherwise strap some timings around the code you suspect to be slow. Creating a form is known to be slow, as it takes loads of resources.

    If it is your first form that is slow, consider a 'splash' form.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  10. #10
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Form Loading..

    Hey Pete,

    That looks like quite a nice application, and I am surprised that it is free!?!

    In the past, I have always been pointed at:

    http://memprofiler.com/

    or:

    http://www.red-gate.com/products/ant...iler/index.htm

    Both of which cost quite a bit of money. Have you ever used either of these? How do they compare to EQATEC?

    Thanks

    Gary

  11. #11
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Form Loading..

    Eqatec is the mutts nuts - designed to work with CF - which most other tools don't.

    I know it started as a free tool but possibly may cost money now - depending on options.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  12. #12
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Form Loading..

    Hey,

    Nice expression

    I have had a quick read, and from what I can see, the free version is just that, completely free. There is a commercial version, if you are going to be using it in a work environment.

    Think I am going to check this out at the weekend.

    Thanks

    Gary

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