






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Abstract:
Software Application programming involves the concept of human-computer interaction and in
this area of the program, a graphical user interface is very important. Visual widgets such as
checkboxes and buttons are used to manipulate information to simulate interactions with the program. A well-designed GUI gives a flexible structure where the interface is independent
from, but directly connected to the application functionality. This quality is directly
proportional to the user friendliness of the application. This note will briefly explain how to
properly create a Graphical User Interface (GUI) while ensuring that the user friendliness and
the functionality of the application are maintained at a high standard.
A large part of working with the user interface involves understanding the code that joins everything together. Since Visual Studio pre generates this code, they give an upper edge on the amount of practices to put in the application by adding simplicity. After all of the design and functionality is completed, the .exe file will be automatically generated to run the program inside and outside of Visual Studio. This note will give examples of final forms and give a more clear view of what is possible with Visual Studio.
Operation:
Microsoft Visual Studio has an advanced variety of tools to create a high level performance GUI’s. This integrated development environment (IDE) is compatible with many different languages, but remains simple to maintain the functionality of the application. Visual Studio has a large assortment of options to create a GUI. As shown in Figure 1, depending on the language that was chosen, there are lists of different projects that can be selected such as a MFC Application, Windows Console Application, and Windows Forms Application. Each one of these different types of applications can be used for a common interface. Still they each have their own special attributes, whether they differ from the code that they generate or the type of methods they used to create the actual form.
Figure 2: New Project showing various Windows Applications
The Windows Forms Application is selected as the base for this note. The empty form for the Windows Application will appear and this will serve as a foundation for the GUI as seen in Figure 2. All types of GUI’s consist of basic tools including: buttons, text boxes, labels, check boxes, etc. The more intuitive controls that the GUI handles care able to correlate with the functionality of the application. However, more controls can decrease the level of user friendliness of the actual GUI.
Figure 3: Initial Form that is generated as well as the common tool for GUI's
Visual Studio Methods:
A key feature that Visual Studio implements in their IDE is the drag/drop method. This method allows the user to pick and choose any tool desired to be a part of the final GUI and drag and drop the tool on to the windows form. With this method the code that runs in parallel with the tools is pre-generated. This takes away the complex and time-consuming task of matching code with each tool. Since there can be a vast number of different and similar controls on the GUI, there is a simple naming convention that is used when using Visual Studio. Each tool placed on the form has a preference window that deciphers what the tool is named, what happens when that tool is clicked, and many other layout settings. This allows the user to organize the GUI more effectively than having tools on the GUI that one cannot decode the uses of in the code. The code behind the GUI is very important since it tells the application the functionality of the program. As previously stated, the code is pre generated in a format that is understandable to even the novice programmer. Double clicking on any tool on the GUI will result in generated code that will trigger a function. Figure 3 shows the function that is produced with the parameters.
Figure 4: Generated Function that correlates to tool on GUI
This section of the code handles an important piece of the interface; it directly connects the user interface to the functionality of the program. This function handles what happens when something on the form is clicked. In this specific case, Figure 3 shows the function that will be referenced once the first button is clicked. All further actions the user wants to implements after the button is clicked will be placed within? this function. There are no limits placed on the process the form should enter once a tool is clicked. Visual Studio supports the ability to create
shows how the code references the variables in the form. The layout, naming, location, and index are all set by this method that Visual Studio implements.
Figure 6: Displaying variables reference in code from the form
Final Forms:
A user interface is required to have a purpose beyond the attractive graphics. Being able to add text boxes that react upon different booleans of checked boxes will ensure the right steps that the user needs to know for interactivity. Figure 6 shows a few different final forms of GUI’s that have been created by Visual Studio.
Figure 7: Different GUI's that are created used Visual Studio
The logic behind the entire interface goes hand and hand with what appears on the interface. However, there will be different if and while statements that can be used to improve the overall performance. For example there could be multiple if statements that would disable text boxes depending on radio buttons or while loops that could continue provided the amount of time per loop from the user. If your application involves drop down menus, they can be directly correlated to the code and improve the user friendliness by minimizing how many actions the user has to make in order to increase the ease of use. The application functionality dictates the user interface and once that is decided then the interactivity should be simplified.
Conclusion:
Microsoft Visual Studio has simple, yet complex methods that are used to create a graphical user interface that has its ease of use range from easy to hard. With the pre-generated code, variables from the form, and different methods to have a less cluttered interfaces, the user can achieve a great amount of application functionality. The final form of the application must include user friendliness and the purpose of the program proportionally. Design Team 11 has decided to use Microsoft Visual Studio to program the GUI that interacts with ReplicatorG. This program will serve as an editor that will change the Gcode produced by ReplicatorG, to update
http://apievangelist.com/2014/08/19/bing-developer-assistant-for-visual-studio- delivers-relevant-api-code/ http://toastytech.com/guis/guitimeline.html http://holowczak.com/getting-started-with-windows-forms-using-visual-c-tutorial/4/ http://stackoverflow.com/questions/9213839/visual-studio-c-sharp-windows-forms- changing-button-color http://www.codeproject.com/Articles/17371/Passing-Data-between-Windows-Forms http://dev.mysql.com/doc/connector-net/en/connector-net-visual-studio-forms- project-wizard-usage.html