Tag: brush

处理静电刷

我正在写一个生物节律应用程序。 为了测试它,我有一个带有Button和PictureBox的表单。 当我点击按钮时,我做了 myPictureBox.Image = GetBiorhythm2(); 哪个第一次运行正常, 但在第二次单击时会导致以下exception: System.ArgumentException: Parameter is not valid. at System.Drawing.Graphics.CheckErrorStatus at System.Drawing.Graphics.FillEllipse at Larifari.Biorhythm.Biorhythm.GetBiorhythm2 in c:\delo\Horoskop\Biorhythm.cs:line 157 at Larifari.test.Button1Click in c:\delo\Horoskop\test.Designer.cs:line 169 at System.Windows.Forms.Control.OnClick at System.Windows.Forms.Button.OnClick at System.Windows.Forms.Button.OnMouseUp at System.Windows.Forms.Control.WmMouseUp at System.Windows.Forms.Control.WndProc at System.Windows.Forms.ButtonBase.WndProc at System.Windows.Forms.Button.WndProc at ControlNativeWindow.OnMessage at ControlNativeWindow.WndProc at System.Windows.Forms.NativeWindow.DebuggableCallback at ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop at ThreadContext.RunMessageLoopInner at ThreadContext.RunMessageLoop at System.Windows.Forms.Application.Run […]

c#径向渐变画笔效果在GDI和winforms中

我创建了ac#windows应用程序并编写了75%的代码。 该程序允许用户创建流程图,并根据状态对流程图形状进行着色。 我希望它们成为像3d一样的按钮 来自网站Webdesign.org 我不想为每个按钮创建一个PNG,而是希望使用画笔或其他技术在C#中创建它们,例如: // Create solid brush. SolidBrush blueBrush = new SolidBrush(Color.Blue); // Create points that define polygon. PointF point1 = new PointF(50.0F, 50.0F); PointF point2 = new PointF(100.0F, 25.0F); PointF point3 = new PointF(200.0F, 5.0F); PointF point4 = new PointF(250.0F, 50.0F); PointF point5 = new PointF(300.0F, 100.0F); PointF point6 = new PointF(350.0F, […]