This Demo show how to create shaped form and customized buttons using Region, GraphicsPath and picture control and using picture control to play animate pictures.
All the graphic is get from Microsoft Media Player and change the size that make the graphic files smaller.
The procedures:
im = new Bitmap("mediaPlayer.jpg"); private void Form_Paint(object sender, PaintEventArgs e){Graphics g = e.Graphics;Rectangle mainRect = new Rectangle(0, 0, 695, 278);Region mainRegion = new Region(mainRect);e.Graphics.SetClip(mainRegion, CombineMode.Replace);// Create a GraphicsPath object and add a curve.GraphicsPath myPath = new GraphicsPath();.........Region ExcludeRegion3 = new Region(myPath);e.Graphics.ExcludeClip(ExcludeRegion3);......e.Graphics.DrawImage(im, 0, 0, 495,278);// Reset clipping region to infinite.e.Graphics.ResetClip();}
Note: Keep all the graphics in the bin/debug directory.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: