Ну типа для общего развития.
Что пишете? Прмеров бы ...

Модератор: Дед Пахом
P.S. Еще напрягает то что часто после записи проекта, в следующий раз он не грузится ... окна форм не открываются. валятся ошибкиg &System.Drawing.Graphics()
pen &Pen()
myrect Rectangle(1,1,100,100)
CODE
g := self.CreateGraphics()
pen := new Pen(Color.Black)
g.DrawRectangle(pen,myrect)
pen.Dispose
g.Dispose
g &System.Drawing.Graphics
sb &SolidBrush
CODE
g := self.CreateGraphics()
sb := new SolidBrush(Color.Black)
g.FillRectangle(sb,new Rectangle(1,1,50,50))
sb.Dispose
g.Dispose
g &System.Drawing.Graphics
font &Font
mystring clastring(100)
CODE
g := self.CreateGraphics()
font := new Font('Times New Roman',36,FontStyle.Regular)
mystring = 'Test string from sea'
g.DrawString(mystring,font, SystemBrushes.Highlight, 10, 10)
font.Dispose
g.Dispose
Код: Выделить всё
FillRectangle(new SolidBrush(Color.Blue),new Rectangle(1,1,50,50))
Код: Выделить всё
try
{
Создать unmanaged-объект()
и работать с ним()
}
catch(...)
{
}
finally
{
объект.Dispose();
}
Код: Выделить всё
FillRectangle(new SolidBrush(Color.Blue),new Rectangle(1,1,50,50))
Код: Выделить всё
// Create a custom brush using a semi-transparent color, and
// then fill in the rectangle.
Color customColor = Color.FromArgb(50, Color.Gray);
SolidBrush shadowBrush = new SolidBrush(customColor);
e.Graphics.FillRectangles(shadowBrush, new RectangleF[]{rectFToFill});
// Dispose of the brush.
shadowBrush.Dispose();