Click here to Skip to main content
15,902,939 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
I want that if i click on an image it gives a visual effect like whirl effect or glow effect or anything else on specific part around the point where i clicked with the mouse. for example if anyone has used the picture password of UC browser of windows phone exactly the same i want.

What I have tried:

I have not tried anything because i have no knowledge of animation and graphics hence i haven't tried anything.
Updated 2-Apr-16 21:07pm
CHill60 2-Apr-16 15:47pm    
Then I suggest you do some research first. Have a look at the articles on CP by searching for graphics in the box in the top right hand corner of this page. If you hit any specific problems come back with the code you are having the problem with.
It would also help if you indicated platform etc - e.g. is this winforms, WPF, something else?
Sergey Alexandrovich Kryukov 2-Apr-16 15:53pm    
Chill60 is right. Besides, the question really looks like a question about nothing. More exactly, this is not a question at all. You just say "I want". So?..
Member 11958493 2-Apr-16 16:09pm    
i have come up with a solution but i dont know how to implement it.
the solution is that when i click anywhere in the picturebox an ellipse should be drawn at that coordinates and ellipse should be filled with a color which will give an effect. please give me some code to implement it.
RickZeeland 2-Apr-16 16:37pm    
See Graphics.FromImage:
Member 11958493 2-Apr-16 17:06pm    
its getting out of my head

1 solution

Here is a library for Win Forms animated controls: Animated Eye Candy for Programmers[^]
If you get an "Nunit" error, just delete the UnitTests project in Solution Explorer.

I think this piece of code in Form1 will be of interest to you:
/// <summary>
/// Put a moving spinning star over the Pause button, just to show we can :)
/// </summary>
private void RunAnimationOnPauseButton() {
    AnimationAdapter pauseButtonAnimationAdaptor = new AnimationAdapter(this.buttonPause);
    Animation pauseButtonAnimation = pauseButtonAnimationAdaptor.Animation;

    Sprite imagesprite = new ImageSprite(Properties.Resources.smallGoldstar);
    imagesprite.Add(0, 3000, Effects.Move(Corner.MiddleLeft, new Point(-20, 0),
        Corner.MiddleRight, new Point(20, 0)));
    imagesprite.Add(0, 3000, Effects.Rotate(0, 680));
    pauseButtonAnimation.Add(0, imagesprite);


Here is an article showing GIF animation in WPF: GIF Animation in WPF[^]

As you seem a bit lost I would also recommend reading "Getting Started with Graphics Programming": Getting Started with Graphics Programming[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900