Combo Box שלושה סוגים של Combo Box: Style 0 (default) - drop-down combo box המשתמש יכול להוסיף אפשרויות לרשימה או ללחוץ על החץ לבחירה מרשימת האפשרויות.

Slides:



Advertisements
Similar presentations
MS-Word XP Lesson 7.
Advertisements

Working with Intrinsic Controls and ActiveX Controls
* 1 Common Dialog Control. * 2 You want your user to set property or provide your application with some information easily? How do you do it? The Common.
Using Macros and Visual Basic for Applications (VBA) with Excel
Tutorial 12: Enhancing Excel with Visual Basic for Applications
1 Visual Basic Programming II Lecture 3 MIS233 Instructor – Larry Langellier.
Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.
Lab4 ListBox Control Properties, Methods and Events.
Chapter 5 - Menus, Sub Procedures, and Sub Functions  Menus - controls - properties and events –menu editor - create and change –defining menus - menu.
VB Default Controls List Box, Combo Box
CVEV 118/698 Visual Basic Lecture 3 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab5 ListBox Control Properties, Methods and Events.
Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,
Lec4 P 1 CP2030 Visual Basic For C++ Programmers Copyright © University of Wolverhampton CP2030 VBFC Lecture 4 Back To Index v Iteration - Looping v Arrays.
Slide 1 VB Default Controls Text Box, Check Box, Option Button & Frames.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
3/9/2004 PPCC - Introduction to VB6 Copyright ©2004, Tore Bostrup 1 Introduction to VB6 Week 2.
Multiple Forms, Standard Modules, And Menus
Multiple Forms and Standard Modules
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
Using Arrays and File Handling
5-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures.
Multiple Forms, Container Controls, AddHandler This presentation is based on the Forms and ContainerControls VB Projects 1.
The Common Dialog Box. Installing the Common Dialog Box May NOT be your standard VB toolbox.
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
ADV_GISVB - III1 Advanced GIS: functions,Procedures, Arrays and Collections Fall 2003.
Mouse Events. Mouse Driven Events Unlike control_click() which is passed no arguments (unless it's an index for an array), MouseDown, MouseUp and MouseMove.
Copyright © 2001 by Wiley. All rights reserved. Chapter 5: The Repetition Process in Visual Basic Event Driven Loops Determinate Loops Indeterminate Loops.
The Repetition Process in Visual Basic. The Repetition Process The capability to repeat one or more statements as many times as necessary is what really.
2 משתנים - variables משתנה - הנו מאגר מידע זמני למרות ש- VB לא מחייבת הגדרת משתנים (כברירת מחדל) רצוי לעשות זאת.  ודא שאופציה Required Variable decleration.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
ListBox, ComboBox, Menu Chapter 5.4, ComboBox Control: Properties & Methods u Combines TextBox features with a short drop- down list  cboOne.AddItem(string)
Visual Basic for Applications Macro Programming For Microsoft Office.
Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.
Data files and databases. Need a control to browse to a file Standard controls for drive folder and list not much use The CommonDialogs control offers.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
© 1999, by Que Education and Training, Appendix A, pages of Introduction to Computer Programming with Visual Basic 6: A Problem-Solving Approach.
Vocabulary in VB So Far. Assignment: Used to change the value of an object at run time Used to change the value of an object at run time.
Overview of VBA Programming & Syntax. Programming With Objects u Objects –Properties: attributes or characteristics of an object (e.g., font size, color,
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.
Chapter 7 P 1 Lists and Loops List boxes and combo boxes List box - list of items - useful for a list which does not change Combo box - list of items -
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Chapter 7 - Lists, loops and printing w List boxes and combo boxes several types can add items at design time or during run time user select from predefined.
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
Click the mouse to continue. Using styles A style is a saved collection of formatting, such as a font, font size, pattern, and alignment, that you can.
Word Processor Version.2. Methods Visual Basic is –Object Oriented –Event Driven Objects –Properties –Methods.
1 After completing this lesson, you will be able to: Get around the Internet with your browser. Connect to the Internet. Print Web pages. Save Web pages.
CONTROL STATEMENTS. A conditional expression uses a comparison operator which results in true or false value. If the comparision is valid it results in.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
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.
Chapter 5 Menus, Sub Procedures and Sub Functions Programming In Visual Basic.NET.
Slide 1 Controls v Control naming convention –Label: lblName –Command Button: cmdName –Text Box: txtName.
Visual Basic Review LBS 126. VB programming Project Form 1Form 2Form 3 Text boxButton Picture box Objects Text box Button Objects.
Chapter 13 Copyright 2000 All rights reserved 1 Chapter 13 Object-Oriented Programming.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
Basic GUI VISUAL BASIC. BASIC GUI Slide 2 of 53 Topic & Structure of the lesson Introduction Data Validation Use controls for making choices Write Pull.
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
Creating New Forms Projects can appear more professional when using different windows for different types of information. Select Add Windows Form from.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
2-1 Chapter 2 Using VB.NET to Create a First Solution.
Multiple Forms and Menus
מחלקות classes.
CSI 101 Elements of Computing – Spring 2009
Standard Controls.
Creating a call message
Chapter 6 - Visual Basic Schneider
CIS16 Application Development and Programming using Visual Basic.net
Data Types List Box Combo Box Checkbox Option Box Visual Basic 6.0
Presentation transcript:

Combo Box שלושה סוגים של Combo Box: Style 0 (default) - drop-down combo box המשתמש יכול להוסיף אפשרויות לרשימה או ללחוץ על החץ לבחירה מרשימת האפשרויות Style 1 - Simple combo box הרשימה מופיעה, אין חץ פתיחה. מאפשר למשתמש להוסיף אפשרויות Style 2 - Drop down list box הרשימה אינה מופיעה עד שלוחצים על החץ. אין אפשרות להוסיף אפשרויות לרשימה

Combo Box - גישה box.list(index) Text1.Text = List1.List(2) התכונה ListIndex - מציינת את המיקום של האלמנט הנבחר ListIndex יהיה (1-), אם לא נבחרה אפשרות או שהמשתמש הוסיף אפשרות התכונה ListCount מציינת את מספר האלמנטים ברשימה

Combo Box - גישה AddItem Removeitem Clear ListIndex ListCount List1.additem “germany” List1.additem “japan”, 0 List1.removeitem 0 List1.clear

Creating Menus By using the menu editor

תיבות דו - שיח שלוש דרכים להוסיף תיבות דו - שיח ליישום שלך : הוספת בקרים לטפסים שימוש בתיבות קלט ופלט (InputBox, MsgBox) שימוש בפקד CommonDialog על מנת להשתמש בתיבות דו - שיח סטנדרטיות כמו : Print, File open

תיבות דו - שיח נפוצות פקד CommonDialog Common Dialog מאפשר להציג את תיבות הדו - שיח הבאות : Open Save As Color Font Print

תיבות דו - שיח נפוצות פקד CommonDialog כדי להשתמש בפקד Common Dialog יש להוסיפו לסרגל הפקדים כך : לבחור Project Components לסמן את Microsoft Common Dialog Control

תיבות דו - שיח נפוצות פקד CommonDialog בזמן ריצה ניתן להשתמש בשיטות הבאות : MethodsDialog Displayed ShowOpenOpen ShowSaveSave As ShowColorColor ShowFontFont ShowPrinterPrint ShowHelpHelp

Open Dialog Box Private Sub mnuOpenItem_Click() CommonDialog1.Filter ="Metafiles_ (*.WMF)|*.WMF" CommonDialog1.ShowOpen Image1.Picture =_ LoadPicture(CommonDialog1.filename) mnuCloseItem.Enabled = True End Sub

Color Dialog Box Private Sub command1_Click() CommonDialog1.ShowColor End Sub

Modal Dialog Box Modal Dialog Box must be closed before you can continue working A Dialog Box is Modal if you click OK or CANCEL before you can switch To display a form as a modal dialog box use a style argument of 1 form1.show 1

Modeless Dialog Box Modeless Dialog Box let you shift the focus between the dialog box and another form without having to close the dialog box. Form1.show

Procedures פרוצדורות מחלקות את התוכנית למספר תוכניות קטנות פרוצדורות שנכתבו עבור פרוייקט אחד יכולות להיות בשימוש עבור פרוייקט אחר Sub procedures do not return a value Function procedures return a value Property procedures can return and assign a values, and set references to objects

Sub Procedures [Private|public][static]Sub procedurename (args) statements End Sub Sub is Public by default call MyProc(arg1,arg2) MyProc arg1,arg2

Function Procedures [Private|public][static]Function procname (args) [As Type] statements End Function As type is variant type by default Label1.Caption = func(y)

By Value Function func(ByVal x As Integer) As Integer x = 3 func = 4 End Function Private Sub Form_Load() Dim y As Integer y = 5 Label1.Caption = func(y) & "---" & y End Sub

By Reference Function func(Byref x As Integer) As Integer x = 3 func = 4 End Function Private Sub Form_Load() Dim y As Integer y = 5 Label1.Caption = func(y) & "---" & y End Sub