PA4XPRO
جمعه 06 آذر 1394, 21:09 عصر
من همیشه در رفع خطا ها مشکل دارم،ممنون اگه کسی کمک کنه
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
String text1 = "سیستم ثبت نام دانشگاه";
GraphicsPath pach1 = new GraphicsPath();
Point Point2 = new Point(298, 325);
pach1.AddString(text1, FontFamily.GenericSerif, 1, 32f.Point2, StringFormat.GenericDefault);
Rectangle[] Patchrect = {new Rectangle(200, 200, 300, 200), new Rectangle(300, 300, 300, 200)};
pach1.AddRectangles(Pathrect);
Region = new Region(pach1);
Point2 = new Point(0, 0);
Point point1 = PointToScreen(Point2);
e.Graphics.TranslateTransform((float) (Left - point1.X), (float) (Top - Point1.Y));
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
e.Graphics.FillPath(Brushes.Deepskyblue, pach1);
e.Graphics.Drawpath(new Pen(Color.DarkMagenta, 10f), path1);
}
}
Error 1 The name 'InitializeComponent' does not exist in the current context line: 20
Error 2 'float' does not contain a definition for 'Point2' and no extension method 'Point2' accepting a first argument of type 'float' could be found (are you missing a using directive or an assembly reference?) line: 28
Error 3 The name 'Pathrect' does not exist in the current context line:35
Error 4 The name 'Point1' does not exist in the current context 39
Error 5 'System.Drawing.Brushes' does not contain a definition for 'Deepskyblue line: 41
Error 6 'System.Drawing.Graphics' does not contain a definition for 'Drawpath' and no extension method 'Drawpath' accepting a first argument of type 'System.Drawing.Graphics' could be found (are you missing a using directive or an assembly reference?) line: 42
Error 7 The name 'path1' does not exist in the current context line: 42
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
String text1 = "سیستم ثبت نام دانشگاه";
GraphicsPath pach1 = new GraphicsPath();
Point Point2 = new Point(298, 325);
pach1.AddString(text1, FontFamily.GenericSerif, 1, 32f.Point2, StringFormat.GenericDefault);
Rectangle[] Patchrect = {new Rectangle(200, 200, 300, 200), new Rectangle(300, 300, 300, 200)};
pach1.AddRectangles(Pathrect);
Region = new Region(pach1);
Point2 = new Point(0, 0);
Point point1 = PointToScreen(Point2);
e.Graphics.TranslateTransform((float) (Left - point1.X), (float) (Top - Point1.Y));
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
e.Graphics.FillPath(Brushes.Deepskyblue, pach1);
e.Graphics.Drawpath(new Pen(Color.DarkMagenta, 10f), path1);
}
}
Error 1 The name 'InitializeComponent' does not exist in the current context line: 20
Error 2 'float' does not contain a definition for 'Point2' and no extension method 'Point2' accepting a first argument of type 'float' could be found (are you missing a using directive or an assembly reference?) line: 28
Error 3 The name 'Pathrect' does not exist in the current context line:35
Error 4 The name 'Point1' does not exist in the current context 39
Error 5 'System.Drawing.Brushes' does not contain a definition for 'Deepskyblue line: 41
Error 6 'System.Drawing.Graphics' does not contain a definition for 'Drawpath' and no extension method 'Drawpath' accepting a first argument of type 'System.Drawing.Graphics' could be found (are you missing a using directive or an assembly reference?) line: 42
Error 7 The name 'path1' does not exist in the current context line: 42