Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Wednesday, May 25, 2011

VB-6 : Creating OLE at Design time


Using the “insert Object dialog box” we can insert image,media-clip,charts,word file etc..on design time itself.
We can browse files and can create new one.

Two command buttons ,and one OLE ( Once the OLE box has appeared,click CANCEL to remove this dialog box)

A)   Property :
Command button : NAME- Command1 , CAPTION- Use OLE
Command button : NAME- Command2 , CAPTION- Exit
OLE                     : NAME-OLE1

B)   Attaching Code to the Object :
Private Sub Command1_Click()
OLE1.InsertObjDlg
End Sub

Private Sub Command2_Click()
End
End Sub

This code links or embeds the complete file.(Refer VB-7 : Part of an OLE Object  also)
=========================================================================
Back to Home   &  VB

No comments: