BZUPAGES.COM Visual Programming Lecture – 6- 7 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.

Slides:



Advertisements
Similar presentations
Prof. Yitzchak Rosenthal
Advertisements

What is a Dialog box? A Dialog box is a window or “form” that contains other child windows or “controls” that have a specific appearances and pre-defined.
XP Tutorial 4 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Personalizing Your Windows Environment Tutorial 4.
© by Pearson Education, Inc. All Rights Reserved.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
Chapter 4: Working with Windows Types of Windows –Program Windows –Message Boxes –Dialog Boxes Elements of a Window –Window Panes –Scroll Bars –Menus –Tool.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Visual Basic Chapter 1 Mr. Wangler.
Chapter 3 Working with Symbols and Interactivity.
Lesson 13: Building Web Forms Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
BIM313 – Advanced Programming Simple Controls 1. Contents Traditional Controls – Labels, Text Boxes, Buttons, Check Boxes, List Boxes, Combo Boxes Advanced.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Chapter 12: Using Controls. Examining the IDE’s Automatically Generated Code A new Windows Forms project has been started and given the name FormWithALabelAndAButton.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
BZUPAGES.COM Visual Programming Lecture – 5 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
Working with Symbols and Interactivity
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
AUTO-BUSINESS HOW DO WE USE HYPERLINKS?. Edit an image that represents a hyperlink If a picture, AutoShape, or other graphic is used to represent a hyperlink,
Chapter 9 - VB.Net by Schneider1 Chapter 9 – Additional Controls and Objects 9.1 List Boxes, Combo Boxes, and the File-Opening Control The List Box Control.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 – Graphical User Interfaces Part 2 Outline.
Graphical User Interface Concepts - Part 2 Session 09 Mata kuliah: M0874 – Programming II Tahun: 2010.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Classic Controls Trần Anh Tuấn A. Week 1 How to create a MFC project in VS 6.0 How to create a MFC project in VS 6.0 Introduction to Classic Controls.
BZUPAGES.COM Visual Programming Lecture – 2 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Microsoft Access 2000 Presentation 3 Creating Databases Part II (Creating Forms)
William H. Bowers – Using Controls Cooper 26.
Visual Basic Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 – Graphical User Interfaces Java Foundations: Introduction to Programming.
User Interface Components Lecture # 5 From: interface-elements.html.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Controls. Common properties Height – Height of the control Left – Left of the control Width – width of a control Top - From the screen top Font – Foreground.
INFORMATION SYSTEM – SOFTWARE TOPIC: GRAPHICAL USER INTERFACE.
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
Click on this button to move to the previous slide of your notebook. Click on this button to move to the next slide of your notebook. Click on this button.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
PowerBuilder Window Window Controls Window Properties Window Types
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
1. Using word you can create the document and edit them later, as and when required,by adding more text, modifying the existing text, deleting/moving.
Chapter 7 Multiple Forms, Modules, and Menus. Section 7.2 MODULES A module contains code—declarations and procedures—that are used by other files in a.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Word processing is the software package that enables you to create,edit, print and save documents for future retrieval reference. creating a document.
Microsoft Foundation Classes MFC
Steps to Build Frame Window Recipe Application
Chapter Topics 15.1 Graphical User Interfaces
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Working with Dialogs and Controls
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Visual Basic.
Working with Symbols and Interactivity
Chapter 15: GUI Applications & Event-Driven Programming
Creating Additional Input Items
Chapter 4 Enhancing the Graphical User Interface
Presentation transcript:

BZUPAGES.COM Visual Programming Lecture – 6- 7 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.

BZUPAGES.COM  It’s a Software tools with which using step by step procedure.  Wizard creates a full environment for application designs.  For dialog based programming Wizard programming is used.  In which we design applications with using such types of applications as ◦ SDI (Single document) ◦ MDI (Multiple Document) ◦ Dialog Based

BZUPAGES.COM  SDI stands for Single document interface. An Application which perform operation on one document at one time….eg Notepad  In which data is used as Text, Graphics, Sound etc  For used SDI programming we want to help with the AppWizard.  AppWizard is used to write a great deal of code in our program.

BZUPAGES.COM  Simultaneously more than one files can be opened in one application.  In which the programs will automatically create a new document object for each new object.  This means that pure data storage and display.  Eg….. MS-WORD  Using two different window type raises as interesting issue in MDI programming when the user is working on the document and also want certain menus as File, Edit….etc

BZUPAGES.COM  This is one of the rectangle area that is used for a purpose of input.  Graphics tools are used in it.  For dialog based programming also used AppWizard.  In dialog Based programming controls are used for input and create our own application through Wizard.  These controls are of many types. Such as Buttons, Radio, Check Boxes …etc

BZUPAGES.COM  For create application through Wizard two classes are used in which  CWinApp  CDialog  CWinApp in used for the handle the full application and next CDialog Class is used for handle the dialog boxes.  These are the base classes of Wizard.

BZUPAGES.COM  “Test” name of application  Wizard will design this using 2 base classes. ◦ CTestApp (derived from WinApp)  Test.h  Test.cpp ◦ CTestDlg (derived from WinApp)  Testdlg.h  Testdlg.cpp

BZUPAGES.COM  Is automatically generates a basic framework for the windows programs. Infect, the framework is itself a complete, executable windows programmes.  In Wizard, further capabilities for managing, modifying and extended code is provided by the Wizard bar, Which is optionally displayed in the toolbar area of Vc++ window.  It’s a particularly used in the context of MFC and API based programming

BZUPAGES.COM  Classes are the most important language feature of c++ and are fundamental to Windows programming with Visual C++.  The class wizard provides an easy means of extending the classes by AppWizard as a part of basic windows application and also helps to add new classes based on MFC Classes.  And also the ClassWizard neither recognizes nor deals with the classes that are not based on MFC Classes.

BZUPAGES.COM

 Dialog: this is one of the rectangle area that is used for the purpose of input.  In dialog based programming such controls are used.  Apart from these forms of input, then also supply input through user interface objects like.

BZUPAGES.COM Controls/Button s WNDCLASS 1. Buttons 2. List Boxes 3. Edit Controls 4. Combo Boxes 5. Scroll bars 6. Static Controls 7. Check Box 8. Slider 9. Radio Buttons  BUTTON  LISTBOX  EDIT COMBOBOX  SCROLLBAR  STATIC  BUTTON  SLIDER  BUTTON MFC ClASS CBUTTON CLISTBOX CEDIT CCOMBOBOX CSCROLLBAR CSTATIC CBUTTON CSLIDER CBUTTON

BZUPAGES.COM  For any application, we have to attach variables with IDs in control.  IDs can’t directly be process so we attach variables as: variable name, category and type.  Data to be stored in variables from controls & variables are then attached.

BZUPAGES.COM  For that, functions which used for that processing. UpdateData(true) ◦ Transfer data from control to be respected variables. UpdateData(false) ◦ Transfer data from variable to controls.

BZUPAGES.COM  MFC provides for creating and communicating. This involves constructing an object from a control class and calling that object’s create () function.  All the MFC control classes override the create () function inherited from cwnd to simplify creation of control.  E.g. mybutton in an object of the type cbutton, mybutton.  Create (“ok”, WS-CHILDIWS-VISIBLE BS-PUSHBUTTON, CRECT (100, 100, 150, 150), This 1),

BZUPAGES.COM  This statement create a push button control. 1. The first parameter in the text that will appear on the face of button. 2. The 2 nd in the button style. 3. Third parameter specifies the control’s location and size. 4. ‘this’ identifies the parent window. 5. ‘1’ in the identifier for the control. This value in abo knows as child window ID.

BZUPAGES.COM Controls:-

BZUPAGES.COM  button controls are of four types 1.Push button 2.Check boxes 3.Radio buttons 4.Group boxes

BZUPAGES.COM  Push buttons are 3D rectangle that appear to go up and down when clicked as if they were push buttons on a control panel. Check boxes Check boxes are small squares in which check marks can be toggled on and off.

BZUPAGES.COM Onchkclick() { Update data (true); If (m-chk ==) m-text = “checkbox checked”; Else m-text = “unchecked”; update data (false); }

BZUPAGES.COM  Radio buttons are small circles that are checked with a solid dot when clicked. Radio buttons are usually used to present a list of mutually exclusive option to the user. That is, checking one radio button unchecks the others in the group.  Radio buttons are provide multiple selection b/w catagories.

BZUPAGES.COM  Ans  For handling and grouping of radio buttons, in one line all radio buttons are considered in one group and If we want to make a group, in an application then we make different groups in this dialog box to select more then one radio buttons at atime. But each in every group. That’s because the three radio buttons already function as a group automatically. They are all in the same window, so they are already coordinated. When the click one of these radio buttons, the program de-selects the other automatically, because they are all share the same window.  In that variable is of into type & is attached only with the group’s checked button which is checked in a particular group.

BZUPAGES.COM  Group boxes are nothing but rectangles used for visual effect.  A button can be clicked with the left mouse button or the spacebar works only if the button has the input focus. A button indicates that it has the input focus by displaying a thin dotted rectangle known as a focus rectangle.

BZUPAGES.COM  A list box is used to display a list of text strings called Items.  An item can be anything that we can describe with the string, a file, name, rno, address…etc  A list box can have capabilities like sorted strings or scroll bars if required.  When the no of choices in list are extended on dialogue box becomes difficult then list box is used.  It takes less area.  List box can also be used as radio buttons or checkboxes of selection point of view.

BZUPAGES.COM  For a List boxes, in there properties checked in the selection check box is extended.  A list box is very useful for presenting a list of items and enabling the user to select items from the list.  A standard list box displays strings in a vertical column and allows only one item to be selected at a time.  The currently selected item in a list box is highlighted usually with blue color.

BZUPAGES.COM  For list boxes such functions will be used for add,, selection, get text and counting…etc  These functions are used with the control variables.  Without attach variables with these functions the functions can’t work properly.

BZUPAGES.COM  Used for add elements in list boxes. m_list.AddString(string) Eg: m_list.AddString(“one”); m_list.AddString(“two”); m_list.AddString(“three”);

BZUPAGES.COM  Used for get text of particular elements through index number. m_list.GetText(index,string); Eg: m_list.GetText(3, str); m_list.GetText(2, str);

BZUPAGES.COM  Used for get current selection.  This will return index of currently selected element. If single selection option is used. m_list.GetText();

BZUPAGES.COM  This will count total number of elements in the list. m_list.GetCount();

BZUPAGES.COM  This will be used to delete a particular element whose index is passed as parameter. m_list.DeleteString(index);  Indexes are rearranged after deleting.

BZUPAGES.COM  A function is used to check which element is selected.  This will return 0 or 1. int= GetCount(index);

BZUPAGES.COM  This will return the number of currently selected elements. m_list.GetSelCount(index);

BZUPAGES.COM  This is a dropdown list.  A combo box control is a combination of a single line edit control and a list box.  The edit control sits on the top of the listbox.  There are three types of combo boxes. 1.Simple 2.Drop-Down 3.Drop-down list

BZUPAGES.COM  The list is displayed permanently.  When the user selects an item from the list box, the item is automatically copied in the Edit control.  Text may also be typed in the simple combo box.

BZUPAGES.COM  Is similar to a simple combo box.  but the list box is displayed only when the user clicks the downward pointing arrow to the right of the Edit box.

BZUPAGES.COM  Works similar but does not permit text to be typed in the edit control.  As a result, the user’s selection is restricted to only items that appearing in the list box.

BZUPAGES.COM  The functions of combo box is same as list box control,  Just for text another function is used. m_list.GetLBText(index, str)

BZUPAGES.COM  Edit controls are used for text entry and editing.  These controls have built-in support for operations like cut, copy, paste, undo..etc  Edit control can be either single or multi line.  Single line edit control are usually used to receive one line text strings like name, password……etc  Multi-line edit control are used to accepting longer text strings like addresses, product info ……etc

BZUPAGES.COM  Static controls come in three varieties :  Text strings  Rectangle  Images

BZUPAGES.COM  Text Strings: ◦ Are usually used alongside other controls like Edit Boxes or list boxes describing their purposes.  Rectangles: ◦ Are used to group together related controls by drawing rectangle around them.  Images: ◦ Static controls can also be used to display images formed from bitmap, icons, cursors, or metafiles.

BZUPAGES.COM  Scroll bar controls are similar to the scroll bars attached to the window.  The difference is that the scroll bars attached to the window are obtained by specifying a window style. ScrollBar::Create()

BZUPAGES.COM  For manage the controls on Dialog Box with respect to the specific application variables are attached with these controls to following such steps.

BZUPAGES.COM