Reputation: 1
In visual studio, when making a C++ windows application form. I want a picture to change when I click on it.
So when I double click the picture and it brings up the click action script, what script do I use.....
Similiar to
int temp = System::Int32::Parse(label1->Text);
temp++; label1->Text =
temp.ToString();
Which just increments an integer in a label
Upvotes: 0
Views: 4332
Reputation: 11
PicutreBox1.OnClick += PictureBox1_Click(PictureBox1,System.Events.OnClick)
---------------------------------------------------------------------------
private void PictureBox1_Click(object^ sender, Events^ e)
{
PictureBox1->Image=Image.FromFile(@"YourFolderPath/image.jpg")
}
Upvotes: 1