private void pbx2_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
Graphics g = ((PictureBox) sender).CreateGraphics(); // Create pen.
Pen blackPen= new Pen(Color.Red, 3);
// Create coordinates of rectangle to bound ellipse. float width = 50.0F;
float height = 50.0F;
float x = e.X - width /2;
float y = e.Y - height /2;
// Create start and sweep angles on ellipse.
float startAngle = 45.0F;
float sweepAngle = 360.0F;
// Draw arc to screen.
g.DrawArc(blackPen, x, y, width, height, startAngle, sweepAngle); g.Dispose();
}
{
Graphics g = ((PictureBox) sender).CreateGraphics(); // Create pen.
Pen blackPen= new Pen(Color.Red, 3);
// Create coordinates of rectangle to bound ellipse. float width = 50.0F;
float height = 50.0F;
float x = e.X - width /2;
float y = e.Y - height /2;
// Create start and sweep angles on ellipse.
float startAngle = 45.0F;
float sweepAngle = 360.0F;
// Draw arc to screen.
g.DrawArc(blackPen, x, y, width, height, startAngle, sweepAngle); g.Dispose();
}
解决方案 »
- 怎么把Excel中的列头"A,B,C,D,E,F,G......"读到一个ComboBox控件中?
- 高分 ---- ---- ---- ---- ----- 如何在VS.NET中卸载Visual Assist X,但保留VC6中的VA?
- 对数据库的操作用什么模式好?
- 数据库问题
- .net 的应用程序报错
- 这样的问题大家遇到了么
- 请问有谁自己写过图片上传控件可以支持多语言
- 带序号的条款内容,如“1.内容1 2.内容2 3.内容3...”,怎么逐条分开它们?
- 一道计算题.怎么也算不出.帮帮忙好吗?谢谢
- 程序中有一个最小化的窗体,双击它的标题栏,能使它回复到原先的WindowState,并且能自动记忆原先的状态是最大化还是Normal状态。我怎么
- 请问如何将字符串类型(string)转化为浮点型(string)?
- 新手 请教高手:C#怎样取得ps/2或rs232接口上的条形码设备读取的条形码?
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
//这里写上自己处理的方法。
}