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.      ...
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...
C# windows application form. Create a base class to store characteristics about a loan. Include customer...
C# windows application form. Create a base class to store characteristics about a loan. Include customer details in the Loan base class such as name, loan number, and amount of loan. Define subclasses of auto loan and home loan. Include unique characteristics in the derived classes. For example you might include details about the specific auto in the auto loan class and details about the home in the home loan class. Create a presentation class to test your design by...
Windows Forms application using Visual Basic: Create a class called Character that a role-playing game might...
Windows Forms application using Visual Basic: Create a class called Character that a role-playing game might use to represent a character within the game. A character should include six stats as instance variables – strength, dexterity, constitution, intelligence, wisdom and charisma (all types are int). Your class should have a constructor that initializes these six instance variables. Provide Properties with an appropriate set and get block for each instance variable. In addition, provide a method named getStatsTotal that calculates the...
Write a Windows Form application named SumFiveInts. Microsoft Visual C#: An Introduction to Object-Oriented Programming,7th Edition....
Write a Windows Form application named SumFiveInts. Microsoft Visual C#: An Introduction to Object-Oriented Programming,7th Edition. Ch. 5, page 220. Take snip of program results.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT