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

radWaitingBar for SplashScreen

11 Answers 666 Views
WaitingBar
This is a migrated thread and some comments may be shown as answers.
Ching-Yen
Top achievements
Rank 1
Ching-Yen asked on 25 Mar 2008, 12:35 PM
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.

11 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 27 Mar 2008, 08:44 AM
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
0
Ching-Yen
Top achievements
Rank 1
answered on 29 Mar 2008, 12:09 AM
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.
0
Boyko Markov
Telerik team
answered on 31 Mar 2008, 08:12 AM
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
0
Jess Askey
Top achievements
Rank 1
answered on 28 Dec 2009, 08:25 PM
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. :-)
0
Smitha Test
Top achievements
Rank 1
answered on 03 Feb 2010, 08:00 PM
Beautiful... nicely done!
0
Fawad
Top achievements
Rank 1
answered on 09 Sep 2012, 02:28 PM
Two years old thread, but wanted to thank. So, thanks , Jess Askey, helped me a lot. :)

Regards.
0
Kostas
Top achievements
Rank 1
answered on 08 Mar 2015, 01:27 PM
6 years old post, but best post on internet for waiting form
0
Moji
Top achievements
Rank 1
answered on 18 Mar 2015, 12:01 PM
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. 
0
Ralitsa
Telerik team
answered on 20 Mar 2015, 02:01 PM
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.

 
0
Firoj
Top achievements
Rank 1
answered on 01 Mar 2016, 07:14 AM
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.
0
Hristo
Telerik team
answered on 01 Mar 2016, 04:44 PM
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
Tags
WaitingBar
Asked by
Ching-Yen
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Ching-Yen
Top achievements
Rank 1
Jess Askey
Top achievements
Rank 1
Smitha Test
Top achievements
Rank 1
Fawad
Top achievements
Rank 1
Kostas
Top achievements
Rank 1
Moji
Top achievements
Rank 1
Ralitsa
Telerik team
Firoj
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or