Hi, I'm new to C#. Please help me with this: I want to click inside a square and then, an "X" should appear. How to implement this is C#. Please help.
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 VTest
{
public partial class Form1 : Form
{
Rectangle rect; // single rect
int sqsize, n;
int margin;
public Form1()
{
n = 3;
margin = 25;
sqsize = 50;
rect = new Rectangle(10, 10, 150, 150);
InitializeComponent();
}
private void Form1_MouseDown(object sender, MouseEventArgs e)
{
what goes here?
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
whatg goes here?
}
private void Form1_MouseUp(object sender, MouseEventArgs e)
{
what goes here?
}
enter code here