Hi guys. You've helped me out a lot in the past, for which I am very grateful. Right now however, I am banging my head against the wall, because I simply cannot get my head around drawing simple shapes!
The current code results in well... Nothing whatsoever. My form is as blank as it ever was.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
initNewGame();
}
private void drawPoint(int x_,int y_){
Graphics g = Graphics.FromHwnd(this.Handle);
SolidBrush brush = new SolidBrush(Color.LimeGreen);
Point dPoint = new Point(x_, (this.Height - y_));
dPoint.X = dPoint.X - 2;
dPoint.Y = dPoint.Y - 2;
Rectangle rect = new Rectangle(dPoint, new Size(4, 4));
g.FillRectangle(brush, rect);
g.Dispose();
}
private void initNewGame()
{
this.drawPoint(50, 50);
}
}
Any ideas of how to hammer this into working order?