 |
|
 |
Hi, I have testing your control in my application and I got a problem is that. When I add the Loading Circle into statusStrip, it work fine in the MDIForm.
this.CircleProgress.LoadingCircleControl.Active = true;
But when I want to run Loading Circle from SubForm, it not work. I have set the control in Public already.
MDIForm frm = new MDIForm();
frm.CircleProgress.LoadingCircleControl.Active = true;
Any idea about that?
Best regards.
|
|
|
|
 |
|
 |
Hi Anybody knows how can use this control in Visual Basic 6..???
Thanks!!
|
|
|
|
 |
|
 |
Well, the LoadingCircle is a .NET 2.0 component. It's not possible to use it with VB6 unless you decide to rewrite the component for VB6.
Martin
|
|
|
|
 |
|
 |
Thanks Martin for for U answer.
So, the component is gif image file ?, or a shape and timer control with changes, in the backcolor property. some idea for write this component ?, What's the objects working in the component design?
Regards,
Sixto
|
|
|
|
 |
|
|
 |
|
 |
I am trying to use the loading circle animation in my application. What I do is when a long process takes place, before starting the process I open a new window (splash screen) which contains the loading circle control and then start my process. As said before, the use of DoEvents() works. But I dont want to call DoEvents in my process. Is there a way to open the new window using a new thread or the BackGround worker and run the process with the default thread? Or perhaps call DoEvents using a different thread or again the BackgroundWorker?
Btw Martin, I will use your control on a non commercial University research application. Could you provide you email so I can add you to the references of the application?
|
|
|
|
 |
|
 |
Hi CostasAn,
Glad to know that you use my control for a University Research Application. First of all, I don't personally recommend the use of DoEvents(). It reminds me VB6 and it's the wrong way to add responsiveness to your application.
The solution that you bring, which consists in using threads, is the right way to add responsiveness. However, you can’t create, change, draw, etc. anything in the UI with other threads. I would suggest you to see your problem from a different point of view. Start your process, the one which take a long time to execute, in a thread (or a BackgroundWorker); open a modal widow (the popup) and start the LoadingCircle and wait for the "end event" from the BackgroundWorker. Let me know what you think of that.
My email is mgagne_98 (at) hotmail (dot) com.
Regards,
Martin
|
|
|
|
 |
|
 |
Hi Martin,
Your suggestion is correct in my opinion but consider this: I develop an application which contains some number of long procedures so I will use loading circle a number of times. I developed a component (which is a splash screen containing the loading circle) which I wish to use in the following way:
splashscreen.Show()
longprocedure()
splashscreen.Close()
What I want to achieve is the code of the original application to remain as is and just add show() and close() of the splash screen in it. So I desire to add code to the splash screen so the animation will be shown without changing the original code, because the splashscreen component will be given to other programers of the application as is. What I think is if there is some way to "call" the loading circle using a thread or something similar.
I tried to add a background worker in the splashscreen which will call a procedure which continuasly calls DoEvents() in a different thread, but this didnt work for some reason I do not understand.
BTW loading circle is a very nice and good looking component. If we could find a solution for this problem rest assured that it will be used further not only in the application I am developing but perhaps in more research applications.
Thanks and regards,
Costas
|
|
|
|
 |
|
 |
Hi Costas,
I don't have a lot of time to answer your question. I think that you should call the method longprocedure() using the BackgroundWorker (i.e. threads). You will see, in the BackgroundWorker, there are different events that will help you to know when the process starts and finishes. Let me know what you think of that.
Regards,
Martin
|
|
|
|
 |
|
 |
One thing I do to update Form UIs when running processes in a BackgroundWorker is create a callback delegate. For example, to set the text property of a lable called lblStatus I would do the following. Delegate Sub SetStatusTextCallback(ByVal [Text] As String) Private Sub SetStatusText(ByVal [text] As String) Try If Me.lblStatus.InvokeRequired Then Dim d As New SetStatusTextCallback(AddressOf SetStatusText) Me.Invoke(d, New Object() {[text]}) Else Me.lblStatus.Text = [text] End If Catch Ex As Exception MessageBox.Show(Ex.Message, "Error") End Try End Sub In the method called by the BackgroundWorker, I would then call the function to set the text. SetStatusText("Performing a long step...") Hope that helps.
|
|
|
|
 |
|
 |
Hi Costas,
I've got the same problem, I don't know how to show an animation during a long processing...
Do you have found a solution ?
Thanks
Julien V.
|
|
|
|
 |
|
 |
I guess I found a solution. Suppose you place this control into another control form.
I mean that you make a form control, then you place this control inside the form.
To avoid the program halt when long operation do the following:
System.Threading.Thread thr ; //as a private member
then suppose you are in some function (in this case the Load event of the any form
private void Form1_Load(object sender, EventArgs e)
{
//Start your own thread
thr = new System.Threading.Thread(new System.Threading.ThreadStart(test));
thr.Start();
//this will be the long operation
double i = 0;
while (i<100000)
{
i += 0.00001;
}
//the long operation ends then you check if the thread exists (just to ensure).
if (thr.IsAlive)
{
thr.Abort();
}
}
//the delegate callback function
delegate void testcallback();
//the function
private void test()
{
//Create a new instance of your control where you have the loading circle control
Loading.Loading frm = new Loading.Loading();
//To ensure the thread exists until the long operation finishes
//we must show the new instance of the form as a modal dialog.
frm.ShowDialog();
}
modified on Wednesday, February 06, 2008 10:59:09 AM
|
|
|
|
 |
|
 |
Hello this is really great! Altough How to I actually add this to my toolbox in VS? I tried to include the assembly through the .net framework components but it doesn't show up on my toolbox.
thanks
Jaffer
jaffer.hussain@gmail.com
|
|
|
|
 |
|
 |
That's how i did it and it appeared as 'LoadingCircle' under 'General' category. I had to try it twice so it would appear. Perhaps you should try it again or maybe you didnt see it.
|
|
|
|
 |
|
 |
Hi Martin,
perhaps I didn't get that memo but is that your site? Merlin A.I. Soft[^]
Especially when I look at this[^] screenshot, I see certain parallels to your article...
cheers,
mykel
OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."
|
|
|
|
 |
|
 |
Hi mykel,
It's not my website at all... Thank you for letting me know. This guy is making money with my control that I share with all of you.
Do you know what I can do with that?
Martin
|
|
|
|
 |
|
|
 |
|
 |
MLoadingCircle is based on Martin's Loading circle, but I made many changes to it, including additional templates and making it easier for a developer to modify the design.
The source included the Copyright disclaimer, so no copyrights were violated. The copyright disclaimer provided by Martin stated:
Martin has asked me to take down MLoading from my site. After consideration, I will comply with his request, even though nothing was done improperly or illegally.
MLoadingCircle has been removed from my website and catalogs. It will not appear again.
|
|
|
|
 |
|
 |
Hi merlin981,
Don't get me wrong, I don't want to condemn you. I just wanted to be sure Martin knows about your site / your product and everything else should be discussed exclusively between Martin and you.
My very personal opinion, which actually isn't relevant, is, that what you did is very bad style: Getting a cool control from CodeProject, adding some minor helper methods to it and then selling the control itself for 30$ made me 'WTF!' out loud!
I guess the majority of CodeProject authors really like to see their babies in real world applications, even commercial ones. Furthermore I think that the majority of authors would really be insulted if somebody comes along, getting their free controls and selling them to other people. As you are a coder yourself you should know how much work, and perhaps heart and soul, it needs to create such things. But now enough of my personal opinion, I hope you understand what I mean.
Ait, since you no longer sell MLoadingCircle and as you said you made many changes / additions to it, I guess Martin would be happy to incorporate these changes into the next release of his fantastic control.
Martin, you got my 5, no question about it!
cheers,
mykel
OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."
|
|
|
|
 |
|
 |
Oh... btw, just a minor question:
Can you please explain the relation between these controls?:
Merlin Graph Components[^]
Screenshot[^]
aaaaand this:
A fast and performing gauge (by A.J.Bauer)[^]
Perhaps it's just me, but also here I see sooooome parallels... I tend to take the CodeProject one, because yours, which looks exactly the same, costs 100$. Too much for my tiny budget!
cheers,
mykel
OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."
|
|
|
|
 |
|
 |
He's essentially riding on the coat-tails of other developers, then making money from his hard work without any of them getting at least some sort of cut. In some cases, merely a renaming took place and was packaged for sale @ $100.00 / license. That's absurd.
Hopefully, someone will lawyer up soon and present a C&D letter.
-- Within chaos, there is peace --
|
|
|
|
 |
|
 |
Yeah, this is a really strange business model!
But on the other side I feel a bit sorry for him. He wants to be a coder but obviously he isn't one. Lurking around, grabbing some code and selling it. Oh, I forgot: He makes major improvements and additions by renaming the controls! Congratulations! Great job!
I guess he won't get rich with it and soon will be vanished.
cheers,
mykel
OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."
|
|
|
|
 |
|
 |
Is there a way I can use this animation to display loading progress on a tab control...just like firefox or IE7 tabs do?
Thanks.
|
|
|
|
 |
|
 |
Hi Meeul,
Very good question. I don't have a real solution for you, but I would suggest to inherit from this control and try to override the OnPaint. There is probably a better solution and I'll take a look at that as soon as I can.
Martin
|
|
|
|
 |
|
 |
Hi
I have added dll to the toolbox.
However i am not able to change radiuses.
When i change them, i clearly see in designer mode that circle becomes bigger.
But every time i run the application the circle is of default size.
The other properties like position etc.. are working fine..
Do you have any idea why this happens?
|
|
|
|
 |