Tutorial: Add UI control on the photo viewer Screen Versions software inside the Graphic Studio

Inside selection of three lessons, it is possible to carry out a windows Versions software that lots a graphic and you can screens they. The Visual Facility Incorporated Design Ecosystem (IDE) has the devices you need to produce the app. To find out more, get a hold of Thank you for visiting the newest Graphic Business IDE.

This option has actually an image package, a great checkbox, and many buttons, that you apply to control the application. It course demonstrates how to add such controls.

Prerequisites

Which example builds for the early in the day lesson, Manage a graphic viewer software. For folks who haven’t over one to course, read this package earliest.

Include control into software

The picture Viewer software uses a great PictureBox handle to show good image. They spends a checkbox and many keys to deal with the picture and record also to intimate the fresh new app. You can easily are the PictureBox and you may good checkbox from the Toolbox for the the newest Graphic Business IDE.

Regarding the Windows Versions Developer, get the TableLayoutPanel your extra in the earlier session. Make sure that tableLayoutPanel1 appears in the Properties window.

For the left area of the Visual Business IDE, select the Toolbox loss. Or even notice it, select Have a look at > Toolbox on diet plan bar or Ctrl+Alt+X. In the toolbox, build Popular Regulation.

Double-simply click PictureBox to provide an effective PictureBox handle on form. Visual Studio IDE contributes the latest PictureBox control to your earliest blank cellphone of your TableLayoutPanel.

Purchase the the brand new PictureBox control to select it, then find the black colored triangle towards the the brand new PictureBox manage to exhibit its activity number.

Discover Dock in Mother or father Container, and therefore kits the new PictureBox Dock possessions to help you Fill. You will see that well worth in the Functions screen.

On the Screen Forms Developer, find TableLayoutPanel. Next, on Toolbox, double-click on the CheckBox items to incorporate a unique CheckBox manage. Their PictureBox occupies the first a few tissue throughout the TableLayoutPanel, so the CheckBox manage is actually set in the lower-remaining phone.

Add keys into the a composition committee

The new controls up until now had been placed into the new TableLayoutPanel. This type of actions make suggestions tips put four keys to an excellent brand new layout panel regarding the TableLayoutPanel.

Discover the TableLayoutPanel with the function. Unlock the latest Toolbox, get a hold of Pots. Double-mouse click FlowLayoutPanel to add yet another handle for the history cellphone of your own TableLayoutPanel.

Place the brand new FlowLayoutPanel’s Pier property so you’re able to Fill. You could potentially lay so it property from the selecting the black colored triangle, next looking Dock when you look at the mother or father container.

Discover new FlowLayoutPanel, right after which open the fresh Arsenal and select Common Control. Double-click on the Option goods to provide a button control entitled button1.

Put several a lot more buttons that way. An alternative choice would be to pick button2, then discover Change > Content otherwise drive Ctrl+C. 2nd, favor Revise > Paste throughout the selection pub otherwise force Ctrl+V. In order to paste a copy of the option. Today insert they once more. See that the fresh IDE adds button3 and you may button4 with the FlowLayoutPanel.

The keys is fall into line by themselves to the right side of the telephone, and contrary their purchase and so the Reveal a picture switch is found on best. You could pull this new buttons within FlowLayoutPanel to set up her or him in just about any acquisition.

Find the Personal option to pick they. Next, to find the remainder of the keys at the same time, force and you will support the Ctrl key and choose her or him, also.

You could focus on your system to see the regulation look. Get the F5 trick, select Debug > Begin Debugging, otherwise discover the Begin key. The keys you added you should never do just about anything, but really.

Alter handle brands

You will find five keys on your own function, called https://datingreviewer.net/edarling-review/ button1, button2, button3, and you may button4 during the C#. Inside the Graphic Earliest, the newest default first letter of every manage name is capitalized, so that the buttons is actually called Button1, Button2, Button3, and you will Button4. Make use of these strategies giving her or him a lot more academic brands.

To your form, find the Intimate button. For those who continue to have all keys chosen, prefer Esc to cancel the selection.

Rename another around three keys to help you backgroundButton, clearButton, and showButton. You might make certain brand new names from the selecting the handle selector get rid of-down list on Qualities window. New key labels are available.

Incorporate dialogue parts

Your software can open visualize files and choose a background color that with areas. A feature feels like a control. Make use of the Arsenal to include a feature on function. You set their properties utilising the Qualities screen.

Instead of an operating, including a component into setting will not add an obvious goods. Alternatively, it provides specific behavior that you could bring about that have code. By way of example, it’s a feature you to reveals an open File dialog field.

Double-click ColorDialog to add an element called colorDialog1. The constituents arrive in the bottom out-of Windows Versions Developer since the signs.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *