4D Blog

Home Product 4D View Pro: Offscreen Areas

4D View Pro: Offscreen Areas

July 21, 2020

Product

Want to dynamically generate 4D View Pro documents on a server and, for example, send them by email or calculate values? 4D v18 R4 introduces a new command to manipulate 4D View Pro commands in an offscreen area: VP Run offscreen area.

The HDI below demonstrates how to use a 4D View Pro offscreen area and export documents in PDF or MS Excel files:

HDI 4DVP offscreen

VP Run offscreen area creates a 4D View Pro area in memory. Simply pass all of the area’s pertinent information in parameter, such as:

  • The area name
  • The method called when an event is thrown by the 4D View Pro area.

 

For example if you want to open a 4D View Pro document to retrieve a value, just create a class with the necessary information and a function named “onEvent“. The “onEvent” function is automatically called when an event occurs in the offscreen area. You can manage events with the FORM Event command.

// OffscreenArea class declaration
Class constructor
C_TEXT($1)
This.filePath:=$1
 
// This function will be called on each event for the offscreen area
Function onEvent
Case of
: (FORM Event.code=On VP Ready)
  VP IMPORT DOCUMENT (This.area;This.filePath)
  This.result:=VP Get value (VP Cell (This.area;6;22))
End case 

Instantiate this class and pass it to the VP Run offscreen area:

$o:=cs.OffscreenArea.new()
$result:=VP Run offscreen area ($o)
ALERT("The G23 cell contains the value: "+String($result))

Refer to the documentation for more in-depth information about what you can do with this new command.

Discuss

Tags 4D View Pro, Document creation, Spreadsheet, v18 R4, v19

Latest related posts

  • February 3, 2026

    4D Write Pro – Adding a margin automatically when bullets are set using standard actions

  • January 22, 2026

    Transform Static Documents into Actionable Knowledge with AIKit

  • January 22, 2026

    Deploy Fluent UI effortlessly in your 4D applications

Fabrice Mainguené
Fabrice Mainguené
• Product Owner •Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 21 R2 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 21 R2 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor
Subscribe to 4D Newsletter

© 2026 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy