Click here to Skip to main content
Licence 
First Posted 29 Aug 2002
Views 126,325
Downloads 2,529
Bookmarked 64 times

A C# water effect picture control

By Christian Tratz | 29 Aug 2002
A C# implementation of the popular water surface effect.
2 votes, 14.3%
1

2
1 vote, 7.1%
3
2 votes, 14.3%
4
9 votes, 64.3%
5
4.64/5 - 23 votes
2 removed
μ 4.13, σa 2.62 [?]

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

About the Author

Christian Tratz

Web Developer

Germany Germany

Member
If you are not living on the edge you are wasting space Wink | ;)

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionLicense PinmemberDanieBeckett0:37 20 Sep '11  
GeneralNeed Help PinmemberJames Noah Black21:09 17 Sep '11  
GeneralThis water effect control PinmemberJohn Chaffins8:05 17 Dec '09  
GeneralF U C K I N G C O O L!!! Pinmembericcb101321:10 16 Jul '09  
Generalhi i want to draw an drawing like a rug PinmembercuteAisha22:45 29 Aug '07  
Generalrunning slow Pinmemberstjds13:57 7 Jan '07  
GeneralBetter result PinmemberSaied Javadi4:58 8 Jul '06  
QuestionWhy not a PictureBox? Pinmemberjeffreylreed6:49 19 May '04  
AnswerRe: Why not a PictureBox? PinmemberChristian Tratz7:51 19 May '04  
GeneralFix for the bug mentioned below PinmemberMatthew Watosn1:15 22 Apr '04  
GeneralBug PinmemberRawSteel7:49 14 Apr '04  
GeneralBug PinmemberSefai2:25 14 Aug '03  
GeneralRe: Bug Pinmemberaguisoft__18:45 21 Mar '10  
GeneralLove it! PinmemberStoo 700:38 1 Jul '03  
GeneralNice Job but could not use it... Pinmemberjvalenz22:15 5 Mar '03  
GeneralRe: Nice Job but could not use it... PinmemberChristian Tratz0:26 6 Mar '03  
GeneralRe: Nice Job but could not use it... Pinmemberjvalenz10:32 6 Mar '03  
GeneralRe: Nice Job but could not use it... PinmemberChristian Tratz22:46 6 Mar '03  
GeneralRe: Nice Job but could not use it... Pinmemberjvalenz6:48 7 Mar '03  
AnswerRe: Nice Job but could not use it... PinmemberGiordani Ramos2:00 12 Dec '10  
GeneralWhy MouseMove and not MouseDown Pinmemberpatil6:29 7 Jan '03  
GeneralRe: Why MouseMove and not MouseDown PinmemberChristian Tratz7:54 7 Jan '03  
GeneralTranslation PinmemberHugo Hallman22:31 20 Oct '02  
GeneralRe: Translation PinmemberChristian Tratz22:55 20 Oct '02  
GeneralExcellent but want to change picture of control PinsussAnonymous21:26 17 Sep '02  

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.

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