This is a migrated thread and some comments may be shown as answers.

Form is slow to appear with the RibbonBar

3 Answers 87 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Jérôme
Top achievements
Rank 1
Jérôme asked on 09 Jun 2009, 04:22 PM
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 ?



3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 10 Jun 2009, 11:44 AM
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.
0
Jérôme
Top achievements
Rank 1
answered on 10 Jun 2009, 05:17 PM
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.
0
Deyan
Telerik team
answered on 12 Jun 2009, 01:51 PM
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.
Tags
RibbonBar
Asked by
Jérôme
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Jérôme
Top achievements
Rank 1
Share this question
or