Windows Forms Programming in C# Windows Forms CSE 494R (proposed course for 459 Programming in C#) Prof. Roger Crawfis.

Slides:



Advertisements
Similar presentations
© 2011 Delmar, Cengage Learning Chapter 1 Getting Started with Dreamweaver.
Advertisements

OpenGL and Windows Windows Forms Programming Roger Crawfis.
1) Terms to Know 2) Starting an Office 97 Application 8) Finding a missing file 7)File Managment 4) Utilizing the Right Mouse Button 6) Using Help 3)
FrontPage Express By John G. Summerville Ph.D.©, RN.
IUPUI Speaker’s Lab CA 001G
COMPREHENSIVE Windows Tutorial 3 Personalizing Your Windows Environment.
Advanced Microsoft Word Hosted by Jared Hoffman Topics Keyboard Shortcuts Customizing Toolbars and Menus Auto Format & Auto Correct Tabs Inserting Pictures.
© by Pearson Education, Inc. All Rights Reserved. continued …
Lab 10: Creating a Presentation
Using Multiple Forms. Creating a New Form ProjectAdd Windows Form.
Copyright 2007, Paradigm Publishing Inc. POWERPOINT 2007 CHAPTER 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create Presentation Open, Save, Run, Print, Close,Delete.
Web Page Development Identify elements of a Web Page Start Notepad
Adding a Syllabus Link. Let’s add the syllabus to the homepage. Return to the homepage Click “Add File” To get to the homepage, click the Course Content.
1 of 7 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
FIRST COURSE PowerPoint. XP New Perspectives on Microsoft Office 2007: Windows XP Edition2 What Is PowerPoint? PowerPoint is a powerful presentation graphics.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
3.2 Presentation Software End Show Creating slide shows including audio,video and digital images End Show.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
 Experiment with the Design features to get the look you want for your presentation.  Most design templates will keep the design the same on all your.
WorkPad 4 Quick Start WorkPad 4 Quick Start  Business Optix brings the rigor and discipline of business modelling and design into.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
05/09/ Introducing Visual Basic Sequence Programming.
Using Technology in Training November 24, 2006 Overview Today’s session will focus on using PowerPoint to develop training materials.
Creating an Expression Web Site
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
PowerPoint Basics “Just what are we trying to do with this software anyway?”
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
IE 411/511: Visual Programming for Industrial Applications
Website Development with Dreamweaver
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
HOW TO BUILD YOUR CULINARY ARTS PORTFOLIO. Adding a New Slide/ Duplicating a Slide Go to the slide menu on the left side of the screen Right click to.
Project 2 Adding Web Pages, Links, and Images Dreamweaver MX 2004 Concepts and Techniques.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Lab1 – Part III CSE 581 Roger Crawfis. To Do We have the basic framework, but need to: 1.Add the ability to open and read an image. 2.Generate pseudo-random.
Productivity Programs Common Features and Commands.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
BIL528 – Bilgisayar Programlama II Introduction 1.
Click your mouse for next slide Dreamweaver – Inserting and Formatting Text Inserting text is just as easy as inserting pictures If you wish to type text.
XP Practical OpenOffice.org Chapter 8 1 Creating a Presentation.
Hi, Learning Skills Students! This is Slide 1 of your Power Point Instruction for this class. After reading each slide, make sure you: 1.Follow the instructions.
Basic PowerPoint By: Monica Rappe This is a presentation graphics program you can use to organize and present information in an exciting way.
Microsoft ® Office Excel 2003 Training Using XML in Excel SynAppSys Educational Services presents:
Lesson No: 6 Introduction to Windows XP CHBT-01 Basic Micro process & Computer Operation.
OpenGL and Windows Windows Forms Programming Roger Crawfis.
FIRST COURSE PowerPoint Tutorial 2 Applying and Modifying Text and Graphic Objects.
January 2006Colby College ITS Setting Up Course Pages.
Forms and Controls Part 3 dbg --- Naming conventions, Button, Event handlers, Label.
 Start Microsoft Word from the icon or shortcut for the application. This is usually accessible from the Start Button. Then go to Programs, then Microsoft.
Session 2: Basic HTML HTML Coding Spring 2009 The LIS Web Team Presents.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Forms and Controls Part 3 dbg --- Naming conventions, Button, Event handlers, Label.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
XP IT INSTRUCTOR :AHMAD HIRZALLAH 1 Microsoft Office FrontPage 2003 Creating Tables and Frames.
VB.NET and Databases. ADO.NET VB.Net allows you many ways to connect to a database. The technology used to interact with a database or data source is.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Microsoft Expression Web - Illustrated Unit A: Getting Started With Microsoft Expression Web.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
 You won’t write a single line of program code.  Instead, you’ll use visual programming techniques.  Visual Studio processes your actions (such as mouse.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 5 1 Microsoft Office FrontPage 2003 Tutorial 5 – Creating Tables and Frames.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Chapter 2: The Visual Studio .NET Development Environment
Presentation transcript:

Windows Forms Programming in C# Windows Forms CSE 494R (proposed course for 459 Programming in C#) Prof. Roger Crawfis

Creating a nice GUI The next several slides will walk you thru a particular design that I like for my applications. The design consists of a GUI panel on the left and a view panel on the right, with a status bar and a main menu.

Create a new Project Select a C# Windows Application

Add your GUI elements Resize the Form to be about 800 by 600, or whatever you like. In this order, add the following elements from the Toolbox->Windows Forms. MenuStrip StatusStrip SplitContainer

GUI design In the Properties window you can make changes to the content and appearance of these controls. Add some status information Add some menu items Change the background colors.

GUI Design Build (Build->Build Solution) and run (Debug->Start without Debugging) your application. Try to achieve something that looks like this:

GUI Design OK. Let’s add some functionality. Work on these tasks: Opening a file selected from the menu. Hiding and displaying the user- interface panel. Setting the text for the number of correct answers and the hint.

GUI Design Your program should now look like this. New Title added Background image added

Examine the code Okay. We have the basic lay-out. Notice we have not done any programming yet. Notice that the Form1.cs file has a hierarchy. Double-click on Form1.cs will open the designer. Right-click on this and select view code or right- click in the designer and select view code to show the source code. Note that it is a “partial class” and that the constructor calls InitializeComponents().

Examine the code Right-click the Form1.Designer.cs and select view code. Browse through this, but do not change it.

Open File Dialogue With windows forms and.Net this is really trivial. Follow these simple steps: 1. Drag an OpenFileDialog control to anywhere on your Form. Notice that it places it in a special window pane below your design. 2. Make sure you add a menu option to open a flash card collection (whatever that is).

Open File Dialogue Adjust the OpenFileDialog’s properties 1. Change the Title to “Select a topic to study” 2. In the Filter property add a string to aid in the right file type selection. Something like this: “All files (*.*)|*.*|My Flash Cards (*.mfc)|*.mfc”. Each pair here has the format (Text string to display | regular expression). Note that adding a space before the asterisk results in a different regular expression. 3. Set the Filter index to 1, such that mfc is the default format. 4. Set the AddExtension to False. 5. Make sure the Multiselect property is False.

Open File Dialogue Okay, we have now defined everything, such that the constructor is called and the properties are set. Nothing will happen though, we need to add some logic. Double click the “Open …” menu item. This adds some template code and brings up the source code window (Form1.cs). Add the following clause in the template for openToolStripMenuItem_Click: if( this.openFileDialog1.ShowDialog() == DialogResult.OK) { }

Windows Forms Programming in C# Windows Forms CSE 494R (proposed course for 459 Programming in C#) Prof. Roger Crawfis