Click here to Skip to main content
11,721,671 members (68,249 online)
Click here to Skip to main content

A C# water effect picture control

, 29 Aug 2002 149.9K 4.9K 72
Rate this:
Please Sign up or sign in to vote.
A C# implementation of the popular water surface effect.

Cool eh ?

Intro

This control is a C# implementation of the well known water effect. There are already two implementations of this algorithm on CodeProject: Really cool visual FX - a C++ variant - and a OpenGL Interactive water effect.

The algorithm itself is well described here and here.

How to use it

The control itself is derived from System.Windows.Forms.Panel. So all you have to do is to place a standard PictureBox control onto your form and change the type of this control to WaterEffectControl.

Then adjust the image source property as follows:

waterControl.ImageBitmap = ((System.Drawing.Bitmap)
               (resources.GetObject("waterControl.ImageBitmap")));

Now run the program, and move the mouse over the image while the left button is pressed. The effect is clearly better than the picture above shows.

Enjoy!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Christian Tratz
Web Developer
Germany Germany
If you are not living on the edge you are wasting space Wink | ;)

You may also be interested in...

Comments and Discussions

 
Questionwatter effect Pin
Member 1053462321-Feb-14 17:52
memberMember 1053462321-Feb-14 17:52 
QuestionCan anyone give vb2008/2010 code for water effect Pin
Member 1043019228-Nov-13 7:12
memberMember 1043019228-Nov-13 7:12 
QuestionCan anyone give vb2008/2010 code for water effect Pin
Member 1043019227-Nov-13 8:35
memberMember 1043019227-Nov-13 8:35 
GeneralMy vote of 5 Pin
David Goebet11-Oct-12 22:19
memberDavid Goebet11-Oct-12 22:19 
GeneralMy vote of 5 Pin
atoi_powered8-Jul-12 2:21
memberatoi_powered8-Jul-12 2:21 
QuestionLicense Pin
DanieBeckett19-Sep-11 23:37
memberDanieBeckett19-Sep-11 23:37 
GeneralNeed Help Pin
James Noah Black17-Sep-11 20:09
memberJames Noah Black17-Sep-11 20:09 
GeneralThis water effect control Pin
John Chaffins17-Dec-09 7:05
memberJohn Chaffins17-Dec-09 7:05 
GeneralF U C K I N G C O O L!!! Pin
iccb101316-Jul-09 20:10
membericcb101316-Jul-09 20:10 
Generalhi i want to draw an drawing like a rug Pin
cuteAisha29-Aug-07 21:45
membercuteAisha29-Aug-07 21:45 
Generalrunning slow Pin
stjds7-Jan-07 12:57
memberstjds7-Jan-07 12:57 
GeneralBetter result Pin
Saied Javadi8-Jul-06 3:58
memberSaied Javadi8-Jul-06 3:58 
QuestionWhy not a PictureBox? Pin
jeffreylreed19-May-04 5:49
memberjeffreylreed19-May-04 5:49 
AnswerRe: Why not a PictureBox? Pin
Christian Tratz19-May-04 6:51
memberChristian Tratz19-May-04 6:51 
GeneralFix for the bug mentioned below Pin
Matthew Watosn22-Apr-04 0:15
memberMatthew Watosn22-Apr-04 0:15 
GeneralBug Pin
RawSteel14-Apr-04 6:49
memberRawSteel14-Apr-04 6:49 
GeneralBug Pin
Sefai14-Aug-03 1:25
memberSefai14-Aug-03 1:25 
GeneralRe: Bug Pin
aguisoft__21-Mar-10 17:45
memberaguisoft__21-Mar-10 17:45 
GeneralLove it! Pin
Stoo 7030-Jun-03 23:38
memberStoo 7030-Jun-03 23:38 
GeneralNice Job but could not use it... Pin
jvalenz5-Mar-03 21:15
memberjvalenz5-Mar-03 21:15 
GeneralRe: Nice Job but could not use it... Pin
Christian Tratz5-Mar-03 23:26
memberChristian Tratz5-Mar-03 23:26 
GeneralRe: Nice Job but could not use it... Pin
jvalenz6-Mar-03 9:32
memberjvalenz6-Mar-03 9:32 
GeneralRe: Nice Job but could not use it... Pin
Christian Tratz6-Mar-03 21:46
memberChristian Tratz6-Mar-03 21:46 
GeneralRe: Nice Job but could not use it... Pin
jvalenz7-Mar-03 5:48
memberjvalenz7-Mar-03 5:48 
AnswerRe: Nice Job but could not use it... Pin
Giordani Ramos12-Dec-10 1:00
memberGiordani Ramos12-Dec-10 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150901.1 | Last Updated 30 Aug 2002
Article Copyright 2002 by Christian Tratz
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid