This is My First Topic.
My Code is the following :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Paint
{
public partial class Form1 : Form
{
bool paint = false;
int size = 2;
SolidBrush brush;
public Form1()
{
InitializeComponent();
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
size = slideSize.Value;
}
private void btnClear_Click(object sender, EventArgs e)
{
paintArea.CreateGraphics().Clear(paintArea.BackColor);
}
private void paintArea_MouseUp(object sender, MouseEventArgs e)
{
paint = false;
}
private void paintArea_MouseDown(object sender, MouseEventArgs e)
{
paint = true;
brush = new SolidBrush(colorDialog1.Color);
paintArea.CreateGraphics().FillEllipse(brush, e.X, e.Y, size, size);
paintArea.CreateGraphics().Dispose();
}
private void paintArea_MouseMove(object sender, MouseEventArgs e)
{
if (paint)
{
brush = new SolidBrush(colorDialog1.Color);
paintArea.CreateGraphics().FillEllipse(brush, e.X, e.Y, size, size);
paintArea.CreateGraphics().Dispose();
}
}
private void btnColor_Click(object sender, EventArgs e)
{
colorDialog1.ShowDialog();
}
}
}
I am asking how to make the drawing smoother bcuz when i draw there are small dots & how to save this picture which i make in png and jpg AND also how to add text??

New Topic/Question
Reply



MultiQuote




|