PDA

Ver la Versión Completa : [Compilador] Se puede generar una DLL con mas de un formulario?


jhjacomo
4 de octubre de 2018, 22:03
Estoy generando una dll (A.DLL) con los formularios a.win, b.win y c.win y desde el formulario a.win llamo al formulario b.win o c.win, y no encuentro la forma de hacerlo.
Alguna ayuda.
Gracias.

Kuk
6 de octubre de 2018, 22:37
jhjacomo, ¿cuál es la sintaxis que usas?

Debería ser:


CALL OPENSHEET OF SHEET1 USING "SHEET2"


Tienes que mirar en las propiedades de cada SHEET cuál es su nombre. El *.win es el nombre físico del fichero donde el IDE guarda metadatos.

jhjacomo
8 de octubre de 2018, 02:53
Gracias Kuk por tu respuesta, yo para no complicarme con esto de los nombres, uso el mismo en ambos lugares, el formulario a.win, en las propiedades le doy el mismo nombre "a".
Yo pensaba que esto era una limitación de las DLL's ,pero creo estoy cometiendo un error en alguna parte. El llamado lo efectuó desde una opción del control MenuBar del formulario principal de la dll.
El llamado lo efectuo de la siguiente manera:

CALL OPENSHEET OF ABMFACTUCPR USING "abmfactucpr.DLL" "PARSTK".

y me da el siguiente error y se cierra la aplicación, cuando el llamado lo hago de la siguiente manera:
CALL OPENSHEET OF ABMFACTUCPR USING "PARSTK"

Solo me dice "SHEET PARSTK not found." y continua la ejecución de la aplicación.

Kuk
8 de octubre de 2018, 19:49
A ver si alguien que conoce más el Power 3 nos echa una mano:

Eslopes, Galileo, Adrianeloy,

jhjacomo
11 de octubre de 2018, 17:56
Alguna ayuda sobre esta consulta?.

Gracias
Julio Jacomo

Galileo
9 de diciembre de 2018, 10:15
Sé que llego tarde para responder a esta pregunta, pero hacía mucho que no me pasaba por el foro. No obstante, si alguien tiene esta inquietud en el futuro, aquí está la solución.

La PowerCOBOL User's Guide indica claramente cómo hacerlo:

Notes About Using DLLs Developed in PowerCOBOL

Entry information must be specified to use DLL files in a
PowerCOBOL application. To specify all of the sheets that
include DLL files you can:

Specify entry information before executing the application.
Create a file called COBOL85.CBR in the directory containing the
application you want to execute. Specify these file contents:

[program-name. ENTRY.]
sheet-name = DLL-name

The components to be include in the COBOL85.CBR file are:

Program-name: To open the sheet from within COBOL85, specify
the COBOL85 program name. To open the sheet from within
PowerCOBOL, specify the starting sheet name.

Sheet-name: Specify the name of the sheet included in the DLL
file.

DLL name: Specify the name of the DLL containing the sheet you
want to open.

OR

Specify entry information upon execution of the application.
In the window that is displayed upon execution of the
application, perform the following actions:

· From the Section menu, select Entry Information.
· Specify the sheet to be opened from within the DLL file.

Use this format:

sheet-name = DLL-name

Where sheet-name specifies the name of the sheet included in
the DLL file and DLL name specifies the name of the DLL
containing the sheet you want to open.

Finally, save the specified contents in the COBOL85.CBR file.
Select the Save button in the Run-time Environment Setup
window.

For more information about the COBOL85.CBR file and the
Run-time Environment Setup window, refer to the “COBOL85
User’s Guide.”

Muestro a continuación un ejemplo que he probado.

[TESTRUTINA.ENTRY]
PASOALETRA=PASOALETRA.DLL
VENTANA2=PASOALETRA.DLL
VENTANA3=PASOALETRA.DLL

Dease el programa principal llamo a la ventana PASOALETRA (incluida en la DLL) o a VENTANA2. Y, desde esta última, a VENTANA3. Funciona perfectamente.

Un saludo, y siento el retraso.