SpeakComputers.com
Home
Software
Electronics
Desktop Computers
Laptops
Games
Handheld Devices
Mobile Phones
Cameras
Camcorders
Printers
Books
Software Downloads 2012 Software Mac Software Security Student Editions Windows 7 Office 2010
ASP.NET C# VB.NET C++ .NET Infragistics DevComponents

Image Reflection in C#

Image Reflection with LinearGradientBrushUsing a combination of the Image properties and drawing graphics, you can create great looking reflection image controls.

Create a user control and add 2 picturebox controls. Assign an image to the first picturebox. Create a function and add the following code.

Bitmap bmp = new Bitmap(this.pictureBox1.Image);
bmp.RotateFlip(RotateFlipType.Rotate180FlipX);
this.pictureBox2.Image = bmp;

In the PictureBox2 Paint event add the following code.

Rectangle myRectangle = new Rectangle(0,-10, this.pictureBox2.Size.Width, this.pictureBox2.Size.Height-100);
LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush(myRectangle, Color.Transparent, Color.White, LinearGradientMode.Vertical);
e.Graphics .FillRectangle(myLinearGradientBrush, myRectangle);
e.Graphics.FillRectangle(Brushes.White, 0, this.pictureBox2.Size.Height - 110, this.pictureBox2.Size.Width, this.pictureBox2.Size.Height);

Computer Security
AntiVirus Software
Internet Security
Parental Controls
Backup & Recovery
Computer Protection
Anti Malware
Photo & Video
Photo & Video Editing
Video Music
Desktop Publishing
Professional Design
Home Publishing
Clipart
Business & Accounting
Accounting
Payroll
Check Printing
TAX
H&R Block
Microsoft Office
Design
Graphic Design
Home Design
Garden Design
Interior Design
Computer Aided Design
3D Design
Students & Teacher
Adobe
Microsoft Office
Dragon Naturally Speaking
Corel Draw
Serif
Student/Teacher Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
Home About Privacy Policy Resouces