Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRAPRADESH
Name : P. Sri Vidya
Designation : Lecturer
Branch : DCCP
Institute : Govt. Polytechnic for Women, Bheemili
Semester : VI Semester
Subject : Visual Basic II
Subject code : CCP- 603
Topic : Object Linking and Embedding(4/10)
Duration : 50 min.
Sub Topic : Properties of OLE Container Control
Teaching Aids : PPT

CCP603.44 1
Recap

• Controls

• OLE controls

• Container control

• OLE container control

• OLE container control pop up menu

CCP603.44 2
Objectives
• On completion of this period, you would be
able to:

• Understand Properties of OLE Container Control

• Know Methods of OLE Container Control

• Understand events of OLE Container Control

CCP603.44 3
Structure
• Properties of OLE Container Control

• Methods of OLE Container Control


• Events of OLE Container Control

CCP603.44 4
Properties, events and methods
• Every control will have certain properties,
methods and events to control its
appearance and behaviour.

• Properties- Characteristics that set the


appearance.

• Methods- Built- in procedures specifying what


to do

• Events- The actions in response to which the


methods respond

CCP603.44 5
List some common properties of
controls in VB

• Caption

• Name

• Text

CCP603.44 6
Properties of OLE Container Control

• Class- Name of the application that produced the


object.

• Object- A reference to the OLE object held in the


OLE control.

CCP603.44 7
Properties of OLE container control

• Auto activate- method to activate the server-

• 0- manual
• 1- getfocus
• 2- doubleclick
• 3- activateauto

• Display type- display type of the object-


• 0- contents
• 1- icon
CCP603.44 8
Properties of OLE Container Control
• OLETypeAllowed- the nature of the object created
• 0- linked
• 1- embedded
• 2- either.

• OLEDropAllowed- allows/not allows drag & drop of


object at runtime.

• True- allows
• False- not allows

CCP603.44 9
Properties of OLE container control
• SizeMode- Determines size of an object displayed in
the OLE control

• 0- clip

• 1- stretch

• 2- autosize

• 3- zoom

CCP603.44 10
Properties of OLE container control
• Source Doc- Determines the file to embed or link

• Source Item- Determines the method of storing the


created objects at run time

0- linked

1- embedded

2- none

CCP603.44 11
Methods of OLE Control
• CreateEmbed – Creates an embedded object from
the specified file and associates it
with the OLE control.

OLE1.CreateEmbed(C:\try.doc”)

• CreateLink- Creates a linked object from the


specified file and associates it with the
OLE control.

OLE1.CreateEmbed(C:\try.doc”)

CCP603.44 12
Methods of OLE control
• InsertObjDlg - Displays the ‘Insert Object’ dialogue

box to select the type of object to


create.

OLE1.InsertObjDlg()

• Close - Closes the active server application

OLE1.close()

CCP603.44 13
Events of OLE control
• ObjectMove - called whenever the active object is
moved.

• Update - Occurs when the object’s data has


been changed.

CCP603.44 14
QUIZ

1. Some controls will not have properties

a) True
b) False

CCP603.44 15
2. Source Doc property determines

a) The method of storing the created object

b) The type how the object is created

c) The file to be connected

d) The display type of the object

CCP603.44 16
3. What method is to be used to display
the Insert Object dialogue box?

a) Close

b) CreateEmbed

c) CreateLink

d) InsertObjDlg

CCP603.44 17
4. Updated event occurs when the object’s data
has been

a) Inserted

b) Changed

c) Deleted

d) Moved

CCP603.44 18
Frequently asked questions
1. List any four properties of OLE Container Control.

3. Explain the properties, methods of OLE Container


Control.

CCP603.44 19
ASSIGNMENT
1. Explain any two main events of OLE.

CCP603.44 20
Summary

• Properties of OLE
• Methods of OLE
• Events of OLE

CCP603.44 21

You might also like