You are on page 1of 19

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(6/10)
Sub Topic : Object linking at design time
Duration : 50 min.
Teaching Aids : PPT

CCP603.46 1
Recap

• Object embedding at design time

• Using

• InsertObject dialogue box

• Drag & drop

• Pop-up menu of OLE container control

• Paste Special

CCP603.46 2
Objectives

• On completion of this period, you would be


able to:

• Understand Object linking at design time

CCP603.46 3
Structure
Object Linking at design time using:

• Insert Object Dialogue Box

• Drog & Drop

• OLE Container Control Short Cut Menu

• Paste Special Dialogue Box

CCP603.46 4
Which method uses the recent version
of document linking/embedding

• Linking

• As it links to the original document

• Each time we insert the object.

CCP603.46 5
We can link an object into OLE
container control
• At design time

• At run time

CCP603.46 6
Object Linking at design time
We can link objects

• At design time using


• OLE container control

CCP603.46 7
Linking an object at design time
• We can link an object at design time in different
ways

• Through InsertObject dialogue box

• By dragging and dropping an object on the control

• Using OLE container control’s shortcut menu

• Using Paste Special dialogue box as icons.

CCP603.46 8
Linking an object through InsertObject
dialogue box

• Start a new project

• Double click the OLE container control icon

• Place an instance of the control on the form.

• InsertObject dialogue box will be displayed.

• Click on CreateFromFile option

• Click the browse button and locate the required file.

• Click on the link check box.

• The selected file appears on the OLE container control


CCP603.46 9
Dragging and dropping the object on
the control
• Start a new project

• Double click the OLE container control icon

• Place an instance of the control on the form.

• InsertObject dialogue box will be displayed

• Click on cancel button to get an empty OLE container


control.

• Set the size mode property to 2- autosize contd.


CCP603.46 10
Dragging and dropping the object on
the control continuation

• Start an application that supports OLE

• Open both VB and that application

• Drag the required part of the application by pressing


right mouse button

• As we drag the object, an oblong shape appears


under the pointer arrow.

• Drop onto the empty OLE container control.

• The linked item will appear on the OLE container


control.
CCP603.46 11
Using OLE container control’s shortcut
menu
• Right click on the OLE container control at design
time to display the shortcut menu.

• Click on the InsertObject option.

• Click on CreateFromFile option

• Click the browse button and locate the required file.

• Click on the link check box

• The selected file appears on the OLE container


control.
CCP603.46 12
Using Paste Special dialogue Box
• Select the required part of the application.

• Click on copy.

• Right click on the OLE container control

• Click on Paste Special option.

• Click on OK in the Paste Special dialogue Box.

• The application will appear in the OLE container


control.
CCP603.46 13
Linking the object as icon
• Click on as icon to link the object as icon in the Paste
Special dialogue Box.

• Run the project

• Double click the icon to open the application

CCP603.46 14
Quiz

1. With linking changes made to the


original object update the object in the OLE.

• True
• False

CCP603.46 15
2. We can link an object into OLE
container control as an icon

a) True
b) False

CCP603.46 16
Frequently asked questions

• Explain the procedure to link an object at design time.

CCP603.46 17
ASSIGNMENT
1. State the main difference in linking and
embedding an object.

CCP603.46 18
Summary
We can link an object at design time using

• Insert Object dialogue box

• Drag and drop method

• Pop-up menu of OLE control container

• Paste Special as icons

CCP603.46 19

You might also like