Question

In: Computer Science

How to make an application for windows using c# ?

How to make an application for windows using c# ?

Solutions

Expert Solution

Hi,

These are the steps that needs to be followed:

  • First, open Visual Studio.
  • On the top left click New, then click on Project.
  • Alternatively, you can press Clrl+Shift+N to do this.
  • You will now be directed to Project window where you will be asked to select the type of project and there on the left side, you'll see the Visual C# option and after you click that you will see the windows option right below it. Click it and you will see list of templates on the right side. Choose Windows Forms Application.
  • Set the name for project(Your application name) and click on OK.
  • You're ready to code now.
  • On the left side(or right side depending on layout) you'll see many options and at the bottom will be Form1.cs and Program.cs
    • The Form1.cs will contain the code you will write for the Application basically you will define functionalities for your application here.
    • The Program.cs file will contain the startup code which will be used to access all the code you created in the Form file.
  • Now, you can add controls to the application like adding a text field to get a value, adding RadioButtons, labels, check boxes, button and basically everything that the user will interact with.
  • You can modify these properties the way you like to
  • Next step will be event handling via which you will basically set how the combination of controls work.
    For example, clicking a button might take all the data from the input fields and store them in storage
    and so on
  • So, when your functionality of the prgram is complete you're ready for the next step which is exporting this into a windows application(.exe file)
    • Now, without closing your current project, right click on Solution (location on the top of the window containing Form1.cs and Program.cs) and click on Add and then click on New Project
    • It will lead you to the project selection window again and this time select Other Project types on the left side, and then VIsual studio installer on the left side, and then click on setup Project on the right side.
    • Give your setup a name for example, setup and click on OK
    • Project will open. On the top click on View -> File System
    • It will show you file system manager containing 3 location : Application Folder, User's Desktop, User's Program Menu
    • For each of the 3 locations listed:
      • right click -> select add -> project output and you will be displayed a list, from there select primary output and hit OK.
      • again right click -> property window, on right side there will be a property called Always create, set it to true
      • Note: do the above 2 steps for all 3 locations listed in the file system manager
  • Now, go to your Debug directory(you will find this folder in the location where your setup project is located)
  • In the directory you will setup file. Install it.(By default it installs in program files directory)

That's it. You can open your program from the directory you installed it in!


Related Solutions

***IN C# ONLY, USING WINDOWS FORMS*** --NO JAVA--. Create a GUI application in C# that calculates...
***IN C# ONLY, USING WINDOWS FORMS*** --NO JAVA--. Create a GUI application in C# that calculates and displays the total travel expenses of a business person on a trip. Here is the information that the user must provide: • Number of days on the trip • Amount of airfare, if any • Amount of car rental fees, if any • Number of miles driven, if a private vehicle was used • Amount of parking fees, if any • Amount of...
Must be in Visual C# using windows forms : Create an application that opens a specified...
Must be in Visual C# using windows forms : Create an application that opens a specified text file and then displays a list of all the unique words found in the file. Hint: Use a LINQ method to remove all duplicate words.
C# Programming Discuss how to build a Multi-Form Windows application in C#. That is an App...
C# Programming Discuss how to build a Multi-Form Windows application in C#. That is an App that has more than one form, like say maybe 5 forms. How do you connect these forms and pass data objects between these forms?
A, B:   Design and Implement a C# windows form application to ask the user for 10...
A, B:   Design and Implement a C# windows form application to ask the user for 10 integer numbers, sort them in ascending order and display the sorted list. Use bubble sort technique to sort the array elements and do not use any built-in sort method to sort the array elements.                                                        [02] C:    Test and evaluate your program by inputting variety of values.
A, B:    Design and Implement a C# windows form application to encrypt and decrypt text....
A, B:    Design and Implement a C# windows form application to encrypt and decrypt text. The application use to receive a string and display another encrypted string. The application also decrypt the encrypted string. The approach for encryption/decryption is simple one i.e. to encrypt we will add 1 to each character, so that "hello" would become "ifmmp", and to decrypt we would subtract 1 from each character.    C:   Test and evaluate application by applying different strings.      ...
Create a Windows application in C# that can be used to change the form color. Your...
Create a Windows application in C# that can be used to change the form color. Your form background color should initially be blue. Provide at least two buttons with two different color choices and a Reset option. Change the font style and size on buttons. Align the buttons so that they are in the center of the form. The color choice buttons should be the same size. Add event handlers for the buttons so that when the user click the...
Create a windows form application in C# that looks and functions like a basic calculator. It...
Create a windows form application in C# that looks and functions like a basic calculator. It must do the following: Add, subtract, multiply, and divide. Account for division by zero. Show at least two decimal places. Retain the last number on the window so that, when the user opens the calculator the next time, the number that was in the window at the last close appears. Have a memory, so that users can store values and recall them. Operate with...
In C# Create a windows application which accepts the month number and displays the month name...
In C# Create a windows application which accepts the month number and displays the month name in a label.   Use a nested if... else statement to determine the month name. For months not in the range 1-12 display the message "Not a valid month"
Create a C# Windows Console application that displays the following patterns separately, one after the other....
Create a C# Windows Console application that displays the following patterns separately, one after the other. You MUST use nested for loops to generate the patterns. All asterisks (*) should be displayed by a single statement of the form Console.Write("*"); which causes the asterisks to display side by side. A statement of the form Console.WriteLine(); can be used to move to the next line. A statement of the form Console.Write(" "); can be used to display a space for the...
Must be in C#: 7. E-MAIL ADDRESS BOOK Create a Windows Forms Application with a class...
Must be in C#: 7. E-MAIL ADDRESS BOOK Create a Windows Forms Application with a class named PersonEntry. The PersonEntry class should have properties for a person’s name, e-mail address, and phone number. Also, create a text file that contains the names, e-mail addresses, and phone numbers for at least five people. When the application starts, it should read the data from the file and create a PersonEntry object for each person’s data. The PersonEntry objects should be added to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT