Link to home
Start Free TrialLog in
Avatar of jdraggi
jdraggiFlag for United States of America

asked on

Speed up form load time at run-time

I am using code to load windows... the problem is that the crystal report windows take forever to load at run time...

Example of a form load:

     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        If Lookup_Account_Form Is Nothing Then
            Lookup_Account_Form = New Lookup_Account
            Lookup_Account_Form.Show()
        End If
        Me.Hide()
        Primary_Screen_Form = Nothing
    End Sub

Example of that form returning back:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Primary_Screen_Form Is Nothing Then
            Primary_Screen_Form = New Primary_Screen
            Primary_Screen_Form.Show()
        End If
        Me.Hide()
        Lookup_Account_Form = Nothing
    End Sub

Any ideas on how to fix this issue... load at program start?  Load forms into memory?  Other ways to do what I have done here?

Thanks,
John
Avatar of The_Biochemist
The_Biochemist

You could try binding the datasource at runtime rater than at design tme that may reduce the overhead whilst trying to load the page if CR is trying to populate it as it loads, maybe!
ASKER CERTIFIED SOLUTION
Avatar of GivenRandy
GivenRandy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdraggi

ASKER

GivenRandy , sounds like a good idea... I'll try to check in to that today!

Thanks!
--John