Form is slow to appear with the RibbonBar

4 posts, 0 answers
  1. Jérôme
    Jérôme avatar
    4 posts
    Member since:
    Jun 2009

    Posted 09 Jun 2009 Link to this post

    Hello,

    I write this message because I noticed that my form is slow to appear with RibbonBar.

    So I had the idea to put a splashscreen to show loading of the application but is also the splashscreen is slow to appear.

    I show the splashscreen and I use the Load event of the splashscreen. In this event, I set the Visible property to False of the form containing the RibbonBar and I used the Show property of this form.

    And in the Load event of the form, I close the splashscreen and I put the Visible property to True to form with RibbonBar

    But that does not work, the splashscreen is slow to appear.

    I hope the splashscreen appears immediately and once the form with RibbonBar loaded, I close the splashscreen form and I show the form.

    Is this possible ?



  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 10 Jun 2009 Link to this post

    Hello Jérôme,

    Thanks for writing. The scenario that you described is possible with the SplashForm component. For instance, you can show the SplashForm before calling the Show method of your main form. You can then use the Shown event of the main form to close your SplashForm. However, I would like to ask you for some more details like the controls that you have on your form and whether it loads slowly only the first time you show it or each time you do this?

    Thank you.

    Do not hesitate to write back if you have further questions.

    Sincerely yours,
    Deyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jérôme
    Jérôme avatar
    4 posts
    Member since:
    Jun 2009

    Posted 10 Jun 2009 Link to this post

    I define as the splashscreen form startup and in the load event of the splashscreen, i call the form with the RibbonBar. Once loaded, I close the splashscreen.

    But, with this method, the splashscreen don't show because the application is monopolized by the generation of the RibbonBar.

    It loads slowly each time.
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 12 Jun 2009 Link to this post

    Hi Jérôme,

    I am not quite sure that I understand the approach you are using.

    Take a look at the following code snippet:

    static class Program 
        { 
            /// <summary> 
            /// The main entry point for the application. 
            /// </summary> 
            [STAThread] 
            static void Main() 
            { 
                Application.EnableVisualStyles(); 
                Application.SetCompatibleTextRenderingDefault(false); 
     
                MySplashForm form = new MySplashForm(); 
                form.Show(); 
                Form1 mainRibbonForm = new Form1(); 
     
                mainRibbonForm.Shown += delegate(object sender, EventArgs e) 
                { 
                    form.Close(); 
                }; 
     
                Application.Run(mainRibbonForm); 
            } 
        } 


    I create my splash form in the Main method within the Program.cs file and immediately show it. After that I create the main form which has the RibbonBar inside and call the Application.Run method. I use the Shown event of the main form to hide my splash form.

    I hope this is helpful. Do not hesitate to write back in case of further questions.

    Sincerely yours,
    Deyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top