15.9k views
3 votes
Create a project named CarDealer that contains a Form for an automobile dealer. Include options for at least three car models. After users make a selection, proceed to a new Form that contains information about the selected model. Use the Controls that you decide are best for each function. Label items on the Form appropriately, and use fonts and colors to achieve an attractive design

1 Answer

2 votes

Answer:

/****************** The code for a form application that uses radioButtons * *and displays new form based on the user selection *****************/

Using system;

Using system windows forms;

namespace CarDealer

{

Public partial class Form1 : Form

{

public Form1()

{

//default constructor to initialize components

InitializeComponent();

}

//when user clicks on the details button

private void detail_Click

(Object sender, EventArgs e)

{

if (model1,Checked)

{

Forms2 f = new Form2()

f.ShowDialog()

model1.Checked = false

}

if (model2.Checked)

{

Form3 f = new Form3();

f.ShowDialog();

model2.Checked = false;

}

if (model3.Checked)

{

Form4 f = new Form4();

f.ShowDialog();

model3.Checked = false;

}

}

}

}

Step-by-step explanation:

Program plan

- Design form: Place label controls with text as select car model and one empty label control to display total price. Change front type and size from each other labels properties window.

- Add three radio buttons with text Renault Kwit, Tata Tiago, Mahindra KUV 100.

- Add button with text View Details.

- Add 3 new windows form from project menu for each car model.

- Change form name and respective car models.

- Place picturebox control to each form by using image property add .jpeg image and place label control containing price of each model to each form

- When user select car model and click on view details, new form containing car model details is displayed.

Form Design is attached below

Create a project named CarDealer that contains a Form for an automobile dealer. Include-example-1
Create a project named CarDealer that contains a Form for an automobile dealer. Include-example-2
User KVM
by
5.6k points