Tutorial: Carry out a matching games WinForms software

Tutorial: Carry out a matching games WinForms software

  • Store objects, such as icons, in a List object.
  • Have fun with a good foreach circle inside C# otherwise an each loop in Graphic Very first so you’re able to iterate as a result of belongings in a listing.
  • Keep track of a great form’s condition that with resource variables.
  • Build a conference handler to respond to incidents that one can fool around with having several items.
  • Build a timer that matters down paltalk daten following fireplaces a conference exactly after immediately following being started.
  • Manage an artwork Business venture that uses Windows Versions.
  • Create and you may style a layout feature.
  • Include and you can format brands to exhibit.

Help make your Window Versions suits game endeavor

On kept area of the The new Opportunity dialogue box, see possibly Graphic C# otherwise Graphic First, then select Window Pc.

On endeavor layouts list, look for Windows Variations Application (.Net Framework). Identity the newest form MatchingGame, right after which come across Ok.

Or even see the Window Models Software (.Net Framework) theme, make use of the Visual Facility Installer to put in brand new .Internet desktop development work.

With the Create a different endeavor window, look for Window Models. Up coming see Desktop regarding the All of the enterprise types listing.

If you don’t see the Screen Models Application (.Websites Construction) layout, you can set it up regarding the Would another type of enterprise window. Regarding the Not selecting what you’re seeking? message, select the Install a great deal more devices featuring link.

Look for Customize on the Graphic Facility Installer. You will be caused to save your projects. 2nd, look for Continue to developed the new workload.

Artwork Business brings a solution for the app. An answer was a container for everybody of the systems and you can files expected by your software.

Create a layout for the video game

Click the form to search for the Window Models Creator. This new case reads Form1.cs [Design] to own C# or Form1.vb [Design] to possess Graphic First. Throughout the Qualities windows, put the following setting services.

  • Replace the Text assets out of Form1 to Complimentary Game. It text message appears at the top of the video game screen.

Discover the Toolbox tab to the remaining area of the IDE. Otherwise notice it, find Glance at > Arsenal from the menu pub otherwise Ctrl+Alt+X.

Drag an effective TableLayoutPanel manage from the Containers class regarding toolbox or twice-mouse click they. Put next features towards the committee about Qualities screen.

Set new BackColor possessions in order to CornflowerBlue. To-do set so it property, discover arrow beside the BackColor possessions. From the BackColor dialogue container, find Net. Regarding readily available color labels, select CornflowerBlue.

Set new Pier assets to help you Fill in the dropdown record of the deciding on the higher middle switch. This option advances brand new desk out so it covers brand new whole mode.

Get the triangle button throughout the higher-proper place of the TableLayoutPanel to exhibit their task diet plan. Towards the activity selection, see Create Line twice to incorporate one or two more rows. Following find Include Line double to include a couple even more columns.

To the task diet plan, pick Change Rows and you can Articles to open this new Column and you may Row Looks screen. Each line, discover the % solution, and then place per column’s width to help you 25 %.

Find Rows about listing towards the top of brand new window, after which lay for each row’s level in order to 25 percent.

The TableLayoutPanel is a four-by-four grid which have sixteen similarly-size of square cells. These types of rows and you may articles is where symbols arrive afterwards.

Create and you may format brands to exhibit

Make sure the fresh TableLayoutPanel is chosen regarding mode editor. You will want to find tableLayoutPanel1 near the top of the newest Characteristics windows. Whether or not it isn’t really selected, find the TableLayoutPanel towards the means, or discover they from the checklist towards the top of the Qualities window.

Open the newest arsenal, as the prior to, and discover the typical Control class. Add a tag manage to your upper-left telephone of the TableLayoutPanel. The newest identity control grew to become chosen regarding the IDE. Place the second characteristics because of it.

Webdings was good font off signs you to vessels toward Windows operating systems. On your coordinating game, the player matches pairs off signs. So it font screens the icons to match.

Unlike c, was various other letters on Text possessions. An exclamation area is actually a crawl, an uppercase N are a close look, and you will a great comma is a chili pepper.

See their Name manage and you will backup it to another location cell regarding TableLayoutPanel. Find the Ctrl+C techniques, otherwise on the diet plan bar, Revise > Duplicate. Next paste it that with Ctrl+V or Revise > Paste.

A duplicate of your basic Identity seems regarding 2nd phone of one’s TableLayoutPanel. Paste it once again, and another Term appears regarding the 3rd cell. Continue pasting Term regulation until most of the structure try occupied.

Second steps

Advance to another training understand ideas on how to assign an effective arbitrary icon every single title and put enjoy handlers to names.

ĐĂNG KÝ NGAY

ĐỂ NHẬN ƯU ĐÃI CỰC LỚN

Hotline: 0886.222.888






Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *