I am doing a battleship project in a C ++/C sharp course and is wondering how one can change the image of a title when hover or clicked on. To explain further, below is a mock up image of what I want to achieve:

The titles used above are pictureboxes and unless there is a easier way, I am thinking of using a different title pic [darker blue] when highlighted. I am thinking it would be something like
private void Tile1A_Click(object sender, EventArgs e)
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Tile1A_Click(object sender, EventArgs e)
{
WindowsFormsApplication2.Resource1.tilehl = WindowsFormsApplication2.Resource1.tile;
}
However, when I try the line above, visual basic mentions something like "WindowsFormsApplication2.Resource1.tilehl' cannot be assigned to -- it is read only"
Are there a way to alter one image in a picturebox to another? Thanks
Mod Edit:
When posting code please use code tags like below.

Start a new topic
Add Reply





MultiQuote


| 


