Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Windows Form Application which consists of a label, picture box, one check box and an exit button. On the click of the picture

Create a Windows Form Application which consists of a label, picture box, one check box and an exit button. On the click of the picture box the image changes.

int imageNum = 0;

// change image whenever PictureBox clicked

void picBox_Click(object sender, EventArgs e )

{

imageNum = ( imageNum + 1 ) % 3;

// imageNum from 0 to 2 create Image object from file, display in PictureBox

picBox.Image = Image.FromFile( “C:\\Programfiles\\Projects\\” + "\\images\\image" + imageNum + ".bmp" );

}

void visCheckBox_CheckedChanged(object sender, EventArgs e)

{

pictBox.Visible = ! visCheckBox.Checked;

}

void exitButton_Click(object sender, EventArgs e)

{

this.Close();

}

Picture Box Click to change the image.... Hide Exit Ox

Step by Step Solution

3.53 Rating (160 Votes )

There are 3 Steps involved in it

Step: 1

Solution Code using System using SystemCollectionsGeneric using SystemComponentModel using SystemDat... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming With Microsoft Visual Basic 2017

Authors: Diane Zak

8th Edition

1337102121, 9781337517058, 978-1337102124

More Books

Students also viewed these Programming questions

Question

Exactly what is a positively charged hydrogen atom?

Answered: 1 week ago

Question

Briefly describe computer- assisted approaches to production.

Answered: 1 week ago