开发者

Graphics.FillRectangle() didn't work

开发者 https://www.devze.com 2023-03-22 02:58 出处:网络
Graphics gp = Graphics.FromHwnd(p2pPic.Handle); SolidBrush sb = new SolidBrush(Color.DodgerBlue); lock (gpPalette)
Graphics gp = Graphics.FromHwnd(p2pPic.Handle);

SolidBrush sb = new SolidBrush(Color.DodgerBlue);

lock (gpPalette)
{
     gpP.FillRectangle(sb, aRectangle);
}

p2pPic is a PictureBox object in c#; these are the main开发者_运维百科 code ,and code does run, but did not take any effect who can tell me why?


Depends where you have placed this code. PictureBox would eventually do its own painting.

0

精彩评论

暂无评论...
验证码 换一张
取 消