Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 947207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:02:53+00:00 2026-05-15T23:02:53+00:00

Lets say i load Form1 and then it shows buttons which let me access

  • 0

Lets say i load Form1 and then it shows buttons which let me access Form 2,3 and 4.

Now, when i click the button to load Form2, I can see that it takes a bit of time to load a few class libraries (.dll) which makes the UI look unresponsive.

I don’t see the form until the class libraries are loaded which makes the Form1 to still be shown until the libraries are loaded. But after that, it is pretty fast.

So how do i pre-load the class libraries, perhaps when the application is started?

I tried putting the using statements to the Form1 and the compact framework is so good that it wont load until it is actually required by Form2. I am talking about 2 seconds of delay but still looks bad.

Is there anyway to overcome this problem? Cant i force the CF to load my dll’s file it is loading System.dll, System.Windows.Forms.dll etc?

UPDATE:

I could load my own class libraries using
Assembly.LoadFrom but I am still unable to load the following files when Form1 loads

Microsoft.WindowsMobile.PocketOutlook.dll
Microsoft.WindowsCE.Forms.dll
Microsoft.WindowsMobile.Utilities.dll
System.Xml.dll

Is it even possible? 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:02:53+00:00Added an answer on May 15, 2026 at 11:02 pm

    It’s not about “loading a class library” it’s about what code needs to be JITted (runtime compiled from IL to machine code). THe first time you show your form, the runtime has to JIT all of the code to create your class instances. It also has to run the constructor, etc. Subsequent times, it may only be showing the form, and even if it has to load a new instance, the JITted code may already be cached and ready to run, meaning no compile is necessary.

    To get the best “visible” performance, you want to keep the amount of JITting necessary when the user click a button to a minimum. If your Form is going to need some services or objects, pre-load them in a background thread so they are ready when the Form needs them.

    Without knowing a bit more about exactly what you’re loading, when you’re loading it, and what your Form’s actually need to display, it’s difficult to give you more detailed direction.

    Edit

    It might look something like this:

    class MyForm
    {
        static void Main()
        {
            new Thread(delegate
                {
                    AppInitialize();
                })
                {
                    IsBackground = true
                }
                .Start();
    
            Application.Run(new MyForm());
        }
    
        static void AppInitialize()
        {
           // load app-wide resources, services, etc
        }
    
        public MyForm()
        {
            InitializeComponent();
    
            ThreadPool.QueueUserWorkItem(
                delegate
                {
                    InitializeServices();
                });
        }
    
        void InitializeServices()
        {
            // load up stuff the Form will need after loading/first rendering
        }
    }
    

    Again, since I have no idea what you’re doing, it may need to be different for your application. I also use an IoC container framework, so my code looks a lot different. Fundamentally I use the same concepts, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have an old application which will try to load an external
Lets say I query the database and load a list of items. Then I
I'm loading my javascript files using Modernizr.load() . Now lets say each page needs
lets say i have a main form which have a lot of functionallity. this
I'm having a view (lets say view1) that has a button to load an
I would appreciate any help on this issue. Lets say I want to load
Let's say I do this: $(#content).load(...); Within what I'm loading some javascript is included:
Lets say I have a single object of type Car which I want to
From the database, I load some data that user can edit. Let's say we
Lets say i have a html file that contain a form: <form method=post action=url>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.