C# // Visual Studio // OnPaint, Custom Controls, Mouse Events Assignment

C# – Microsoft Visual Studio, Windows Forms

Topics: OnPaint, Custom Controls, Mouse Events

Instructions: 

Student will make the first of three parts of a project that will eventually be combined to form a tile editor application. In this first part, the tile selection control will be created.

This tile selection control is made up of two forms and a custom control that you will build. The custom control will contain an image that shows a tileset. A grid will need to be drawn separating each tile from the others, this can be done in the OnPaint method. When a tile is clicked (single- or double-clicks or both if you want to) the tile that was selected should be stored in a property of the control in some way and the currently selected tile should have a different color outline in the grid than the other tiles. Only one tile should be selectable at a time, so selecting a different one should deselect the original. The tile in position 0,0 should be selected by default.

The main form will contain the custom control as well as a ToolStrip and a StatusStrip. The StatusStrip should simply display a string that tells the user which tile is currently selected. The ToolStrip should contain a button for selecting a different tileset image and another button for opening a separate form with options for modifying the selectable grid in the custom control.

The grid options form will allow the user to change the height and width of the selectable grid rectangles. They can also change the number of tiles by adjusting the height and width of the grid.

A demo executable for this application can be downloaded in the attatchments.

Tilesets that you can test your lab with are located in the attatchments.

These are the guidelines used by the grading rubric:

Custom Control: Properties and Events

  • Values that need to be accessed from the other forms are stored as properties of the control. (tile height, tile width, selected tile, etc.)

  • A tile can be clicked or double clicked to set that tile as the selected tile. Only one tile can be selected at a time.

  • The tileset image can be changed.

Custom Control: Grid Drawing

  • Grid that separates each tile is drawn.

  • Selected tile is surrounded by a different color from the rest of the grid.

  • Grid dimensions for height and width of each rectangle can be modified.

  • Grid dimensions for number of tiles in terms of number of columns and rows can be modified.

Main Form

  • ToolStrip is used for access to loading a new tileset image and the grid options.

  • StatusStrip uses text to indicate which tile is selected.

  • Contains an instance of your custom control.

Extra Information

Go back through your code and check for the following:

  • Your application must compile and must not crash when starting up.

  • All variables and methods are named appropriately.

  • Input controls are appropriately labeled.

  • Any information being output to the user should be clear and concise.

  • Make sure nothing accesses an object that doesn’t exist.

  • Add comments to your code to indicate that you know what each line does.

*** DONT FORGET TO DOWNLOAD THE ATTACHMENTS ***

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyStudyWriters
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Human Resources Management (HRM)
excellent, great job
Customer 452773, June 19th, 2023
Business and administrative studies
Perfect
Customer 452773, February 23rd, 2023
Nursing
Impressive writing
Customer 452547, February 6th, 2021
Human Resources Management (HRM)
excellent job
Customer 452773, June 25th, 2023
English 101
great summery in terms of the time given. it lacks a bit of clarity but otherwise perfect.
Customer 452747, June 9th, 2021
Leadership Studies
excellent job
Customer 452773, July 28th, 2023
Business and administrative studies
excellent work
Customer 452773, March 9th, 2023
Human Resources Management (HRM)
excellent work
Customer 452773, July 3rd, 2023
English 101
IThank you
Customer 452631, April 6th, 2021
History
Looks great and appreciate the help.
Customer 452675, April 26th, 2021
Leadership Studies
excellent job
Customer 452773, August 26th, 2023
Business and administrative studies
always perfect work and always completed early
Customer 452773, February 21st, 2023
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Close

Sometimes it is hard to do all the work on your own

Let us help you get a good grade on your paper. Get professional help and free up your time for more important courses. Let us handle your;

  • Dissertations and Thesis
  • Essays
  • All Assignments

  • Research papers
  • Terms Papers
  • Online Classes
Live ChatWhatsApp