130 likes | 268 Vues
This resource explores creating Windows applications using C# in Visual Studio. It highlights key components including the setup of forms, the functionality of MessageBox for user interaction, and essential GUI classes. Users will learn to navigate the IDE, utilize drag-and-drop features, manage components, and handle events in their applications. The guide includes practical examples, like creating a cabinetry application, and discusses advanced options like form opacity and a main menu system. Perfect for both beginners and experienced programmers looking to enhance their Windows programming skills.
E N D
Windows Programming in C# Corinne Hoisington Central Virginia Community College
Forms and Windows Programming • Console-based applications aside, most users expect to interact with a window based program. • When you create a Windows application using Visual Studio, the Integrated Development Environment (IDE) includes one form in the project.
Creating a MessageBox • A MessageBox is a GUI object that can contain text, buttons, and symbols that inform and instruct a user • You must use the static class method Show() to display a message box, because its constructor is not public
Creating a MessageBox Output of MessageBox1 program
Creating a MessageBox Arguments used with the MessageBox.Show() method
Using GUI Classes in Applications • Using MessageBox objects Addition.cs
GUI Applications • Using a Form that is a program's main window Window1.cs Window2.cs WindowWithButton.cs
Using the Visual Studio IDE • Code view and design view (like VB) • Easy to: • Drag and drop components • Add properties • Create events • New Items • Form Opacity • Anchor Docking • Much Easier Main Menu System • Monthly Calendar • Date Picker Calendar
Now Let’s Create an Entire Application Together • Wood Cabinetry Example • This could be placed on a Mobile Computing Device (PDA) • C# has truly added some of VB’s better options such as form development
Create a Form inputTextBox outputTextBox code
C# Textbooks • Programming with Visual C#.NET • By: Joyce Farrell • ISBN 0-619-06273-8 • Publish Date: May 29, 2002 (Course.com)