Click here to Skip to main content
Click here to Skip to main content

A C# water effect picture control

, 29 Aug 2002
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 | ;)

Comments and Discussions

 
Questionwatter effect PinmemberMember 1053462321-Feb-14 18:52 
QuestionCan anyone give vb2008/2010 code for water effect PinmemberMember 1043019228-Nov-13 8:12 
QuestionCan anyone give vb2008/2010 code for water effect PinmemberMember 1043019227-Nov-13 9:35 
GeneralMy vote of 5 PinmemberDavid Goebet11-Oct-12 23:19 
GeneralMy vote of 5 Pinmemberatoi_powered8-Jul-12 3:21 
QuestionLicense PinmemberDanieBeckett20-Sep-11 0:37 
GeneralNeed Help PinmemberJames Noah Black17-Sep-11 21:09 
GeneralThis water effect control PinmemberJohn Chaffins17-Dec-09 8:05 
GeneralF U C K I N G C O O L!!! Pinmembericcb101316-Jul-09 21:10 
Generalhi i want to draw an drawing like a rug PinmembercuteAisha29-Aug-07 22:45 
Generalrunning slow Pinmemberstjds7-Jan-07 13:57 
GeneralBetter result PinmemberSaied Javadi8-Jul-06 4:58 
QuestionWhy not a PictureBox? Pinmemberjeffreylreed19-May-04 6:49 
AnswerRe: Why not a PictureBox? PinmemberChristian Tratz19-May-04 7:51 
GeneralFix for the bug mentioned below PinmemberMatthew Watosn22-Apr-04 1:15 
GeneralBug PinmemberRawSteel14-Apr-04 7:49 
GeneralBug PinmemberSefai14-Aug-03 2:25 
GeneralRe: Bug Pinmemberaguisoft__21-Mar-10 18:45 
GeneralLove it! PinmemberStoo 701-Jul-03 0:38 
GeneralNice Job but could not use it... Pinmemberjvalenz5-Mar-03 22:15 
GeneralRe: Nice Job but could not use it... PinmemberChristian Tratz6-Mar-03 0:26 
GeneralRe: Nice Job but could not use it... Pinmemberjvalenz6-Mar-03 10:32 
GeneralRe: Nice Job but could not use it... PinmemberChristian Tratz6-Mar-03 22:46 
GeneralRe: Nice Job but could not use it... Pinmemberjvalenz7-Mar-03 6:48 
AnswerRe: Nice Job but could not use it... PinmemberGiordani Ramos12-Dec-10 2: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
Web04 | 2.8.141223.1 | Last Updated 30 Aug 2002
Article Copyright 2002 by Christian Tratz
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid