Repackaging a water effect control project into "control definition project" and "demo project"
Posted on 2009-12-16
At that other web site (www codeproject com) there is a really interesting project titled "A C# water effect picture control". This project downloads, converts to VS 2008, compiles and runs. But I can't understand how to use it on another application I'm creating. In their project, some of my problems/issues/difficulties are:
(1) The toolbox clearly shows a WaterEffectControl. When I enlarge the WaterEffectForm (to make a clear space) and drag this control from the toolbox onto the forms' surface, I get: " The control WaterEffectDemo.WaterEffectControl has thrown an unhandled exception in the designer and has been disabled. Exception: Object reference not set to an instance of an object. Stack trace: at WaterEffectDemo.WaterEffectControl.WaterEffectControl_Paint(Object sender, PaintEventArgs e) in C:\C# Programming Stuff\CONTROLS A C# water effect picture control\WaterEffectPictureBox.cs:line105.
I am used to dropping a control onto a form and being a happy camper. The odd thing for me is that this happens even in their solution. Of course, I get the same problem when I try to repackage this for use in another project.
(2) The use of "resources" and "resx" etc. seems very awkward. I would much prefer a line such as "this.waterControl.ImageBitmap = new Bitmap(@C:\GRAPHICS\myPicture.bmp", true);
(3) A number of control code samples are really pleasant to work with: there is a "project" that defines the control (and this seems to always put the control in the toolbox); and then there is a "demo project" that shows how to use the control.THE DIFFICULTY WITH THIS water effect code (and me) is that I don't understand how to reorganize the parts into a "control definition project" and a "demo project".
SO, HERE IS THE REQUEST: Is there anybody here who will download the project and repackage it into a "control definition project" and a "demo project"? Thank you for considering my request.
P.S. Please remove/delete all unnecessary parts (especially the .resx stuff.)