author | StephaneLenclud |
Tue, 16 Aug 2016 12:59:32 +0200 | |
changeset 235 | ba14a29944c4 |
permissions | -rw-r--r-- |
StephaneLenclud@198 | 1 |
using System; |
StephaneLenclud@198 | 2 |
using System.Collections.Generic; |
StephaneLenclud@198 | 3 |
using System.ComponentModel; |
StephaneLenclud@198 | 4 |
using System.Drawing; |
StephaneLenclud@198 | 5 |
using System.Data; |
StephaneLenclud@198 | 6 |
using System.Linq; |
StephaneLenclud@198 | 7 |
using System.Text; |
StephaneLenclud@198 | 8 |
using System.Threading.Tasks; |
StephaneLenclud@198 | 9 |
using System.Windows.Forms; |
StephaneLenclud@198 | 10 |
|
StephaneLenclud@198 | 11 |
namespace SharpDisplayManager |
StephaneLenclud@198 | 12 |
{ |
StephaneLenclud@198 | 13 |
public partial class FxControl : UserControl |
StephaneLenclud@198 | 14 |
{ |
StephaneLenclud@198 | 15 |
public FxControl() |
StephaneLenclud@198 | 16 |
{ |
StephaneLenclud@198 | 17 |
InitializeComponent(); |
StephaneLenclud@198 | 18 |
} |
StephaneLenclud@198 | 19 |
|
StephaneLenclud@198 | 20 |
protected override void OnPaint(PaintEventArgs e) |
StephaneLenclud@198 | 21 |
{ |
StephaneLenclud@198 | 22 |
// Call the OnPaint method of the base class. |
StephaneLenclud@198 | 23 |
base.OnPaint(e); |
StephaneLenclud@198 | 24 |
|
StephaneLenclud@198 | 25 |
SolidBrush brush = new SolidBrush(Color.Blue); |
StephaneLenclud@198 | 26 |
// Declare and instantiate a new pen. |
StephaneLenclud@198 | 27 |
Pen myPen = new Pen(brush); |
StephaneLenclud@198 | 28 |
|
StephaneLenclud@198 | 29 |
// Draw an aqua rectangle in the rectangle represented by the control. |
StephaneLenclud@198 | 30 |
e.Graphics.DrawRectangle(myPen, new Rectangle(new Point(0,0), this.Size - new Size(1,1))); |
StephaneLenclud@198 | 31 |
} |
StephaneLenclud@198 | 32 |
} |
StephaneLenclud@198 | 33 |
} |