Domino Code Fragment
API call to NNOTESWS.DLL to display Progress Bar
|Source (or email address if you prefer)*|
makes API calls to display progress bar
Just as Windows has a set of DLLs, Lotus Notes has a set of DLLs. Notes uses DLLs to collect procedures which are then called as needed. You can use many of these procedures in any Notes application. In fact most software will include a set of libraries. If you know what functions are contained within these libraries you can use the functions and sub routines in your code to help you interact better with that particular software.
In the next activity we will utilize several functions within the NNOTESWS.DLL library to create a progress bar across our screen. This bar could come in handy when you want to present a visual display of work in progress, like the processing of many documents to produce a report.
To use these libraries you follow the same set of rules that were previously outlined. When declaring external functions keep in mind the scope your function required for your application. If you only need the external routine in a single Button method, then it's best to add a declare statement in that method's (Declarations). If you need the routine in more than one method for an object, then declare it in the form's (Globals) window. If you need the routine in several forms, declare it in a Script Library and Use the library as needed.
Declaring External Procedures
External procedures can be declared from any LotusScript Module or object. They can be declared either local to the current object, or global to the application.
The external procedures are declared as either Function or Sub using one of the following:
This example demonstrates the declaration of the progress bar function located in NNOTESWS.DLL file:
Declare Function NEMProgressBegin Lib "nnotesws.dll" ( Byval wFlags As Integer ) As Long
The NEMProgressBegin function creates the progress bar dialogbox. If the parameter wFlags is odd, then the dialog bar created by NEMProgressBegin will contain two text variables for use by the function NemProgressSetText. If wFlags is even it will only contain the first string parameter of NemProgressSetText.
Note: If wFlags = 32 then no string parameters are displayed and the bar runs along the bottom of the screen.