radWaitingBar for SplashScreen

12 posts, 0 answers
  1. Ching-Yen
    Ching-Yen avatar
    65 posts
    Member since:
    Nov 2007

    Posted 25 Mar 2008 Link to this post

    Hi,

    I try to add the radWaitingBar @ the VB.NET splash screen (the defult splash screen with setting property project). But, for unknown reason, the waitingbar is not running. Any one could help on this, please?

    Thanks.
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 27 Mar 2008 Link to this post

    Hello Ching-Yen,

    Thank you for contacting us.

    Could you give me more information about the RadWaitingBar not running? Typically, you start the wating bar by calling the StartWaiting method. To stop the waiting bar use the EndWaiting method of RadWaitingBar

    If you have any other questions, please let me know. I will be happy to help you.

    All the best,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ching-Yen
    Ching-Yen avatar
    65 posts
    Member since:
    Nov 2007

    Posted 28 Mar 2008 Link to this post

    Hi,

    Yes, basically i already set the start waiting. I all resources weere used during the main form loading, and make the splash screen looks hang. Everything seems okay if I make the splash screen as a saperate thread. It just won't work if I use the ordinary way where set the form as splash screen @ the project property page.
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 31 Mar 2008 Link to this post

    Hi Ching-Yen,

    Indeed, the approach with a different thread when you have a resource-intensive process is the better one. This is because the GUI thread is frozen until the calculations are done and you will see no progress in the waiting bar, as the window active area will not be repainted.

    We've prepared a Knowledge Base article to provice guidance in the case when you have a lot of calculations in your application. You can find it at this link: http://www.telerik.com/support/kb/article/b454K-mae-b454T-ckt-b454c-ckt.aspx 

    I hope that it would be helpful. Please feel free to write me if you have any other questions. 

    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Jess Askey
    Jess Askey avatar
    3 posts
    Member since:
    Oct 2009

    Posted 28 Dec 2009 Link to this post

    Not sure how much this helps, but I created a separate form that basically functions like a modal waiting dialog with a status message... this works pretty well but could probably be improved with some better state checking. The code uses a separate background thread for the dialog in order to keep things running nicely.

    This is a standalone form called WaitingDialog that simply contains a RadWaitingBar and a Label. The dialog is modal and there are two static methods for showing and hiding the dialog...

    using System; 
    using System.Collections.Generic; 
    using System.ComponentModel; 
    using System.Data; 
    using System.Drawing; 
    using System.Linq; 
    using System.Text; 
    using System.Threading; 
    using System.Windows.Forms; 
     
    namespace My.Dialogs 
        public partial class WaitingDialog : Form 
        { 
            private static Thread _waitingThread; 
            private static WaitingDialog _waitingDialog; 
     
            private WaitingDialog(string message) 
            { 
                InitializeComponent(); 
                radWaitingBarMain.StartWaiting(); 
                labelMessage.Text = message; 
            } 
     
            public static void ShowDialog(string message) 
            { 
                //Show the form in a new thread 
                ParameterizedThreadStart threadStart = new ParameterizedThreadStart(LaunchDialog); 
                _waitingThread = new Thread(threadStart); 
                _waitingThread.IsBackground = true
                _waitingThread.Start(message); 
            } 
     
            private static void LaunchDialog(object message) 
            { 
                _waitingDialog = new WaitingDialog(message.ToString()); 
     
                //Create new message pump 
                Application.Run(_waitingDialog); 
            } 
     
            private static void CloseDialogDown() 
            { 
                Application.ExitThread(); 
            } 
     
            public static void CloseDialog() 
            { 
                //Need to get the thread that launched the form, so 
                //we need to use invoke. 
                if (_waitingDialog != null
                { 
                    try 
                    { 
                        MethodInvoker mi = new MethodInvoker(CloseDialogDown); 
                        _waitingDialog.Invoke(mi); 
                    } 
                    catch { } 
                } 
            } 
     
        } 
     

    it would be used like this....

    WaitingDialog.ShowDialog("Doing something that takes a long time."); 
                     
    SomethingThatTakesALongTime(); 
                
    WaitingDialog.CloseDialog(); 

    If anyone has any suggestions or improvements, please have at it. :-)
  7. Smitha Test
    Smitha Test avatar
    23 posts
    Member since:
    Oct 2009

    Posted 03 Feb 2010 Link to this post

    Beautiful... nicely done!
  8. Fawad
    Fawad avatar
    38 posts
    Member since:
    May 2009

    Posted 09 Sep 2012 Link to this post

    Two years old thread, but wanted to thank. So, thanks , Jess Askey, helped me a lot. :)

    Regards.
  9. Kostas
    Kostas avatar
    1 posts
    Member since:
    Mar 2015

    Posted 08 Mar 2015 Link to this post

    6 years old post, but best post on internet for waiting form
  10. Moji
    Moji avatar
    6 posts
    Member since:
    Mar 2015

    Posted 18 Mar 2015 in reply to Boyko Markov Link to this post

    Apparently your provided link is old enough not to be valid any more after 7 years. Can you please update the link? I have the same issue mentioned in this topic. 
  11. Ralitsa
    Admin
    Ralitsa avatar
    176 posts

    Posted 20 Mar 2015 Link to this post

    Hi Moji,

    Thank you for contacting us. 

    You can refer to the following link: Add SplashScreen to your application. All articles from Knowledge Base can be found here: Knowledge Base: UI for WinForms

    Hope this will help you. Let me know if you have any other questions.

    Regards,
    Ralitsa
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  12. Firoj
    Firoj avatar
    1 posts
    Member since:
    Feb 2016

    Posted 01 Mar in reply to Jess Askey Link to this post

    How to update text of message label on model dialog during complex code execution. i.e I want to update that label to let the user know  that what going on.
  13. Hristo
    Admin
    Hristo avatar
    714 posts

    Posted 01 Mar Link to this post

    Hi Firoj,

    Thank you for writing.

    Basically you would need to invoke the label element from your main form and report the progress. We have a nice KB ​article suggesting a sample approach: Indicating progress in applications that have their primary UI thread busy. A similar topic has also been dicussed in our documentation: Using WaitingBar with a Background Worker.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready