Friday, November 18, 2011

C# - Draw a Rectangle on a Picture Box on Mouse-Move

private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
 pictureBox1.Refresh();
 System.Drawing.Graphics g = pictureBox1.CreateGraphics();
 System.Drawing.Pen p = new System.Drawing.Pen(System.Drawing.Color.Blue);
 g.DrawRectangle(p, new Rectangle(e.X, e.Y, 40, 80));
 p.Dispose();
 g.Dispose();
}

Thursday, November 17, 2011

Enable Query Log for MySQL

File: my.ini

[mysqld]
#Set General Log
log = "c:/wamp/logs/genquery.log"