PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview of OLE control
  • WINDEV and OLE controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview of OLE control
The OLE control allows you to handle an OLE object.
Reminder: OLE is a protocol for exchanging data and commands whose principle consists in embedding and linking objects. The Client/Server connection is established as soon as the embedded object is opened.
An OLE object is a file containing:
  • the reference of the OLE server that created the object
  • the object itself (image, document...).
Technically speaking, an OLE object encapsulates data containing text, images, sounds... Data encapsulation in OLE objects enables these objects to be exported without knowing anything about their structure.
To create an OLE control:
  1. In the window editor, click or select "Insert .. Control .. OLE control".On the "Creation" pane, in the "Other controls" group, click "OLE".
  2. Click the position where the control will be created in the window.
To display the control characteristics, select "Description" from the popup menu of control.
WINDEV and OLE controls
WINDEV is an OLE client. The applications developed in WINDEV request the data, display and store the OLE objects.
The OLE servers provide the objects to the clients that request them. These objects can be PaintBrush, Excel, WinWord...
As a client, WINDEV supports the OLE objects. It is used to:
  • draw an object in an OLE control. An object can be an Excel worksheet, a Paint Brush graphic image...
  • edit an OLE object in an OLE control. The OLE object can be:
    • chosen in the editor or by programming.
    • defined according to a server or to a base file.
Notes:
  • In programming, an OLE control is handled by specific functions. WINDEV is not an OLE server.
  • OLE version 1 and OLE version 2 are supported (the later versions are not supported).
  • An OLE object cannot be printed in WINDEV. The object is updated upon request.
  • An OLE control can contain a single OLE object.
Related Examples:
WD Controlling Excel Training (WINDEV): WD Controlling Excel
[ + ] This example explains how to control Excel via OLE Automation.
All the features included in Excel can be emulated.

This example requires Excel 97 or later.

Summary of the example supplied with WINDEV:
Controlling a spreadsheet as Excel may be useful to allow the user to keep his own habits from the software powered by WINDEV.
This process is very easy via the "CExcel" class supplied with WINDEV.
The main features of Excel can be directly called (chart, inserting objects, sorts, ...).
How do I control Excel via OLE Automation?
An OLE Automation contains methods and properties. This allows you to emulate it directly in WLanguage.
For example, to display the selected cell in bold:
MyOLEAutomationObject>>Selection>>Font>>Bold = True
WD Controlling OpenOffice Base Training (WINDEV): WD Controlling OpenOffice Base
[ + ] Open Office is a suite of free office tools that include several modules such as a word processor, a spreadsheet, a drawing tool as well as a database. WINDEV supports a large number of databases natively but the Open Office database is not one of them.
However, you can access an Open Office database through OLE objects. The OLE protocol allows applications to communicate between themselves in spite of different formats.
This example provides a class allowing you to easily handle an Open Office database without having to handle OLE objects.
WD Controlling Word Training (WINDEV): WD Controlling Word
[ + ] This example explains how to control Word via OLE Automation.
All the features included in Word can be emulated.
This example is compatible with the versions 97, 2000 and 2002 (XP) of Word.
Summary of the example supplied with WINDEV:
Controlling a text processor as Word may be useful to allow the user to keep his own habits from the software powered by WINDEV.
This process is very easy via the "CWord" class supplied with WINDEV.
The main features of Word can be directly called (text formatting, inserting objects, mailshot, and so on).
How do I control Word via OLE Automation?
An OLE Automation contains methods and properties. This enables you to emulate it directly in WLanguage.
For example, to write the selected text in bold:
MyOLEAutomationObject>>Selection>>Font>>Bold = True
WD Controlling Outlook Training (WINDEV): WD Controlling Outlook
[ + ] This program, powered by WINDEV, is used to read and write in the Outlook folders:
- Email
- Calendar
- Contacts
- Tasks
- Notes

An OLE dialog is used to read and write data in the Outlook files.
Note: We will be using the Outlook software supplied with the later versions of MS-Office. The software used is not "Outlook express".

"WD Controlling Outlook" also presents an example for using the WINDEV databinding between the variables found in the code and in the controls.

This example also presents the OOP (Object-Oriented Programming) and the UML diagrams.
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment