怎么在窗口中画点?????

longenic 2002-10-20 08:31:04
怎么在窗口中画点?????

只要画点的,
...全文
20 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lkal4587 2002-10-20
  • 打赏
  • 举报
回复
画一条线,起点与终点相同
fulaser 2002-10-20
  • 打赏
  • 举报
回复
up
saucer 2002-10-20
  • 打赏
  • 举报
回复
GDI+ does not have a DrawPixel or SetPixel method (Bitmap class has a SetPixel method), but you can simulate it with DrawEllipse or FillRectangle method, for example:

private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen pen = new Pen(Color.White, 2);
SolidBrush redBrush = new SolidBrush(Color.Red);
g.DrawEllipse(pen, 100,150,1,1);
g.FillRectangle(redBrush, 140, 35, 1,1);
}

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧