Spinning wheel (sort of)?

H

Helmut Giese

Hello out there,
I would like to have an "activity indicator" when my program is in its
"active state". Not a progress bar type of control, because this state
will last as long as the user decides - there is not really a '100 %
mark'.
Firefox shows kind of a 'moving ring' in its upper right corner while
loading a page - something like this would be perfect.
Since I am not exactly the graphical designer type of guy any link to
something comparable would be greatly appreciated.
Thanks and best regards
Helmut Giese
 
A

Andy O'Neill

Helmut Giese said:
Hello out there,
I would like to have an "activity indicator" when my program is in its
"active state". Not a progress bar type of control, because this state
will last as long as the user decides - there is not really a '100 %
mark'.
Firefox shows kind of a 'moving ring' in its upper right corner while
loading a page - something like this would be perfect.
Since I am not exactly the graphical designer type of guy any link to
something comparable would be greatly appreciated.
Thanks and best regards
Helmut Giese

Almost trivial in wpf or silverlight where you have animations and can
easily rotate an image.
What are you working in?
 
H

Helmut Giese

Hi Andy,
Almost trivial in wpf or silverlight where you have animations and can
easily rotate an image.
What are you working in?
sorry, I keep forgetting that .NET is a lot of things. I am working
with Windows Forms using C#.
Best regards
Helmut Giese
 
A

Andy O'Neill

Helmut Giese said:
Hi Andy,
sorry, I keep forgetting that .NET is a lot of things. I am working
with Windows Forms using C#.
Best regards
Helmut Giese

2 options.
I'm kind of biased as I'm working in wpf now so.

1) Host a wpf control in your windows page.
See msdn article
Walkthrough: Hosting a Windows Presentation Foundation Control in Windows
Forms.
This is not a trivial fix but it gets you somewhat into wpf and we
developers always like new stuff. right?
Also easier to make the spinning look smooth than option 2 since animation
is anot just an afterthought in WPF.

2) Stick an image control on your windows page and rotate an image in it.
See msdn article
How to: Rotate, Relect, and Skew Images
That gets you a fixed rotation so you'd need a timer and recalculat the
corners each time it fires.
Short duration for a smoother look.

The popular spinny images just have a bunch of ovals or circles arranged in
a circle with some of them filled in with colour and a transparent
background.
Then they're rotated.

Hope that helps.
 
H

Helmut Giese

Hi Andy,
I think I'll go with option 2 - thanks for the link.
2) Stick an image control on your windows page and rotate an image in it.
See msdn article
How to: Rotate, Relect, and Skew Images
That gets you a fixed rotation so you'd need a timer and recalculat the
corners each time it fires.
Short duration for a smoother look.
Yeah, what do we have the processing power of our modern CPUs for if
not for rotating small images. :)
The popular spinny images just have a bunch of ovals or circles arranged in
a circle with some of them filled in with colour and a transparent
background.
Then they're rotated.
If you happen to have a link, this would be just marvellous - I'd have
a hard time doing any graphic stuff.

In any case, thanks for your help and best regards.
Helmut Giese
 
P

Peter Duniho

Helmut said:
Hello out there,
I would like to have an "activity indicator" when my program is in its
"active state". Not a progress bar type of control, because this state
will last as long as the user decides - there is not really a '100 %
mark'.

Does it have to be a circle? The ProgressBar control does have an
"indefinite progress" display mode (ProgressBarStyle.Marquee) that does
what you describe.

If you do have to have a circle, it is certainly possible to have a
single image that you display by rotating. But unless you want _really_
fine granularity for the animation, you may find it's simpler to just
have a series of .png images that you display (that's how programs like
Firefox handle it). For example, 16 different bitmaps, one for each
step in the animation.

You'll still need to have some kind of timing mechanism, of course.
System.Windows.Forms.Timer would be appropriate if you're writing a
Forms application.

Pete
 
H

Helmut Giese

Hi Marc,
interesting idea (and I'll make a mental note: .NET supports animated
GIFs)
You can take a shortcut, and put an animated GIF on the form.
but it won't be a shortcut for me: I'd need a day or so to get the
images and produce the animated GIF - I am definitively not the
graphics guy.
Still, thanks for joining in and best regards
Helmut Giese
 
H

Helmut Giese

Hi Peter,
Does it have to be a circle? The ProgressBar control does have an
"indefinite progress" display mode (ProgressBarStyle.Marquee) that does
what you describe.
that's an interesting piece of information, thanks.
I used it to arrive at a fast solution:
- The progress bar's width set as small as possible (still 80, though,
since the width of the boxes is not configurable), and
- set the ForeColor to Silver

and now I have something which 'moves' but doesn't force itself
visually on the user. As an idea I would still prefer FireFox's moving
circle - but I would spend an awful amount of time getting the images.

So I have a working solution. Thanks for the info and best regards
Helmut Giese
 
A

Andy O'Neill

If you happen to have a link, this would be just marvellous - I'd have
a hard time doing any graphic stuff.

In any case, thanks for your help and best regards.
Helmut Giese

I spent 10 minutes looking for you but the simple examples I used to see
seem to have been replaced with smart alec drawing methods which are no good
to you.
Are you still stuck?
I can write something draws a suitable image in wpf and spits a file out or
you could screen grab.
 
P

Peter Duniho

Helmut said:
[...]
If you happen to have a link, this would be just marvellous - I'd have
a hard time doing any graphic stuff.

Google is great for questions like "if you happen to have a link". :)

That said, had I not Googled for GIFs myself, I might never have learned
that someone's actually coined a name for these things: "throbber".

Anyway, see if you find something you like here:
http://www.sanbaldo.com/wordpress/1/ajax_gif/
http://www.andrewdavidson.com/articles/spinning-wait-icons/
http://www.starbase1.co.uk/Animated-GIF/Spin-and-tumble/index.html

And the Wikipedia page:
http://en.wikipedia.org/wiki/Throbber

Hope that helps.

Pete
 
P

Peter Duniho

Helmut said:
[...]
If you happen to have a link, this would be just marvellous - I'd have
a hard time doing any graphic stuff.

Oh, almost forgot. The Wikipedia article includes a link to this cool site:
http://www.ajaxload.info/

You specify a bunch of parameters, and it generates animated GIFs on the
fly for you.

Pete
 
H

Helmut Giese

Hi Andy,
I spent 10 minutes looking for you but the simple examples I used to see
seem to have been replaced with smart alec drawing methods which are no good
to you.
this is awfully kind of you, thanks very much.
Are you still stuck?
I can write something draws a suitable image in wpf and spits a file out or
you could screen grab.
No, don't bother. I achieved a solution using a progressbar (style
'marquee') which although not being as visually pleasing as I would
have liked still served its purpose.
And now with Peter's links to "throbbers" I will be all set and done.

Thanks again for your time and best regards.
Helmut Giese
 
H

Helmut Giese

Hi Peter,
Google is great for questions like "if you happen to have a link". :)
sure, but using Google successfully requires some talent - notably
some kind of intuition (is that the word I mean?)

Which words would others have used to describe what I mean?

and maybe I am not as good as the next guy in this regard.
Of course, in this domain (programming at large) it probably helps
being a native english speaker.
In any case I would never have googled for 'spinning wait [icon]' or
'spin and tumble' (and certainly not for 'throbber' - what an
invention :) ).

Apart from all this I really appreciate your help. I'll go and grab
one off of http://www.sanbaldo.com/wordpress/1/ajax_gif/ - it has a
"no restriction whatsoever' type of license. Or maybe I'll play around
on http://www.ajaxload.info/ and generate "my own".

Thanks and best regards
Helmut - throbber --- would you believe it - Giese
 
P

Peter Duniho

Helmut said:
Hi Peter,
sure, but using Google successfully requires some talent - notably
some kind of intuition (is that the word I mean?)

Which words would others have used to describe what I mean?

For what it's worth, I used the search phrase "program busy animated
gif" to start with. Of course, part of the trick to using Google or any
other search engine is to pay attention to the results and see if there
are related terms that might refine the search better.
and maybe I am not as good as the next guy in this regard.

Practice makes perfect! :)
Of course, in this domain (programming at large) it probably helps
being a native english speaker.

It probably helps some. But if you can express in English anything
about what you're trying to do, you should be able to get results.

In fact, one of the links I included is the TOP hit for the phrase
"spinning wheel animated gif", which is simply the combination of the
subject line _you_ provided for this discussion :), and one of the
suggested solutions (the animated GIF).

Which is not to fault you for asking here, or for having trouble finding
the information you wanted on your own. I simply mention these things
as they might help you gain confidence with Google and similar tools,
even in the face of your non-native English skills (which frankly, are
every bit as good as most native speakers I know :) ).

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top