Question

Your graphics assignment is to write a program for windows forms in C#. C# Program. That...

Your graphics assignment is to write a program for windows forms in C#. C# Program. That will draw a red circle in the middle of the screen. I also need to know how to set up the form. Please and thank you.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code for red circle

System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Red);

System.Drawing.Graphics formGraphics;

formGraphics = this.CreateGraphics();

formGraphics.FillEllipse(myBrush, new Rectangle(0, 0, 300, 300));

myBrush.Dispose();

formGraphics.Dispose();

Creating a Windows Forms Application Using Visual Studio 2017

--Firstly, open the Visual Studio then Go to - - - - >File

-> New

-> Project - - to create a new project and then select the language as Visual C# from the left menu.

- - >Click on Windows Forms App(.NET Framework) in the middle of current window. After that give the project name and Click OK.

-->After that following window will display which will be divided into three parts as follows:

1..EDITOR WINDOW : Here, you will work with forms and code editing. You can notice the layout of form which is now blank. You will double click the form then it will open the code for that.

2..Solution Explorer Window: It is used to navigate between all items in solution. For example, if you will select a file form this window then particular information will be display in the property window.

3..Properties Window: This window is used to change the different properties of the selected item in the Solution Explorer. Also, you can change the properties of components or controls that you will add to the forms.

You can also reset the window layout by setting it to default. To set the default layout, go to Window -> Reset Window Layout in Visual Studio Menu.

Now to add the controls to your WinForms application go to Toolbox tab present in the extreme left side of Visual Studio. Here, you can see a list of controls. To access the most commonly used controls go to Common Controls present in Toolbox tab.

Now drag and drop the controls that you needed on created Form. For example, if you can add TextBox, ListBox, Button etc. as shown below. By clicking on the particular dropped control you can see and change its properties present in the right most corner of Visual Studio.

To run the program you can use an F5 key or Play button present in the toolbar of Visual Studio. To stop the program you can use pause button present in the ToolBar. You can also run the program by going to Debug->Start Debugging menu in the menubar.

Add a comment
Know the answer?
Add Answer to:
Your graphics assignment is to write a program for windows forms in C#. C# Program. That...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Challenge: Recursion and Python Turtle Graphics Submit Assignment Due Friday by 11:59pm Points 100 Submitting a...

    Challenge: Recursion and Python Turtle Graphics Submit Assignment Due Friday by 11:59pm Points 100 Submitting a file upload Available after Nov 9 at 12am Challenge: Recursion and Python Turtle Graphics Description: Write a program that draws a picture using Python e, recursion, and Turtle graphics e. Purpose: The purpose of this challenge is to provide experience working with recursione in Pythone. It also provides experience working with Turtle graphics in Pythone Requirements: Recursion and Python Turtle Graphics provides information on...

  • C# WINDOWS FORMS APPLICATION (not CONSOLE APPLICATION ) (Please screenshot window form of this program and...

    C# WINDOWS FORMS APPLICATION (not CONSOLE APPLICATION ) (Please screenshot window form of this program and write code on computer. Thank you very much !) For this week's assignment , create and complete a Windows application for the following question. Airline Reservation System: An airline has just bought a computer for its new reservation system. Develop a new system to assign seats on the new airplane( capacity: 10 seats) Display the following alternatives: "Please type 1 for first class, and...

  • create the java graphics program to write your first name in lines on the screen (...

    create the java graphics program to write your first name in lines on the screen ( using jpanel to draw to line )

  • Phython 3 Assignment. Write a graphics program to display (draw) a simple house using at least...

    Phython 3 Assignment. Write a graphics program to display (draw) a simple house using at least 4 shapes and 3 different colors. Add some landscaping too! Please use comments to explain you code

  • Java program GCompound Practice Exercise CS141 Assignment Write a class that represents a digital snowman. Your...

    Java program GCompound Practice Exercise CS141 Assignment Write a class that represents a digital snowman. Your class should follow these guidelines: 1. Store the following private class variables bodyColor of type Color b. int x, int y for the upper left corner Graphics g. a. C. 2. Create two different constructor methods a. A (int x, int y, Graphics myG) parameter constructor that makes the snowman a light gray color by default and makes x and y the upper left...

  • Write a C++ program that computes a student’s grade for an assignment as a percentage given...

    Write a C++ program that computes a student’s grade for an assignment as a percentage given the student’s score and the total points. The final score should be rounded up to the nearest whole value using the ceil function in the <math> header file. You should also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by a space. If...

  • Very difficult and confusing assignment for C++ need help! Write a program that prompts a user...

    Very difficult and confusing assignment for C++ need help! Write a program that prompts a user to enter a line of text (including whitespace). Please use string object NOT C-string, a string library can be included. 1. Convert the input into uppercase and output the string to the screen. 2. Get the first and the last characters then appends the line with "I Love C++" and output the string to the screen. Example: Input: Hello, How are you? Output 1:...

  • my subject :Introduction to Computer Graphics Problem #1 You need to write a program which implements...

    my subject :Introduction to Computer Graphics Problem #1 You need to write a program which implements both DDA and Bresenham’s Line Generation Algorithms. The program should prompt the user to enter tow points coordinate and then compute and display the estimated coordinate of the line segment on the screen. Example Please enter your line segment starting point? 10 10 Please enter the coordinate of the line segment end point? 50 30 What algorithm to use DDA Bresenham’s Your program should...

  • Kindly write the code in C++ and also please show the screenshot of the output. Will...

    Kindly write the code in C++ and also please show the screenshot of the output. Will appreciate your kind response. Thank you. Question 2: Code this UML using pure virtual function. Shape polymorphic operations draw(g: Graphics ) getArea(): int getBoundingArea(): int abstract superclass 1 Square Circle drawl g: Graphics ) getArea(): int drawl g: Graphics ) getArea(): int concrete subclasses

  • Write a program equivalent to the C language assignment statement z = a + (b *...

    Write a program equivalent to the C language assignment statement z = a + (b * c) + (d * e) - (f / g) - (h * i); Use only: (a) Three-address instructions (b) Two-address instructions Please explain the process as clearly as possible. I would like to LEARN how this is done in so little address instructions. Thank you.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT