Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Advanced PowerBuilder

HomePrevious Lesson: Insert Class In the OLE Control
Next Lesson: Inserting an Object In the OLE Control

Inserting an Existing File In the OLE Control

Calling the InsertFile() embeds a copy of the existing object into the control. The following example inserts the specified object.
String lFileNameWithFullPath, lFileName
Integer lResult
lResult = GetFileOpenName( "Select File to Open " + &
        "in OLE Control", lFileNameWithFullPath,lFileName)
If lResult = 0 Then Return
lResult = ole_1.InsertFile( lFileNameWithFullPath )
If lResult <> 0 Then
   MessageBox( "File Insert Error", lResult )
   Return -1000
End If
ole_1.Activate( InPlace! )

Activate() function activates the inserted file, i.e., invokes the OLE Server (The program that created the file).

To see it in the action, run the application. Select 'Module > OLE Control Examples' menu option. Click on the Insert File CommandButton.
HomePrevious Lesson: Insert Class In the OLE Control
Next Lesson: Inserting an Object In the OLE Control

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com