Cobol Foro

Cobol Foro (https://www.cobolforo.es/index.php)
-   PowerCOBOL (ActiveX, v4 - v11) (https://www.cobolforo.es/forumdisplay.php?f=9)
-   -   [Duda] Tamaño de pantalla (https://www.cobolforo.es/showthread.php?t=185)

Roger 11 de julio de 2015 19:58

Tamaño de pantalla
 
Amigos del foro
Tengo diseñado mis sistemas con un forma 14000 x 900 cuando la pantalla es más grande, Tengo activado escalable en true Windows state maximize y se adapta al tamaño de pantalla el problema Surge cuando se visualiza en una pantalla de menor tamaño solo me sale una parte del programa
¿Se puede hacer que el programa reconozca el tamaño del monitor y se adapte a esa medida?

Rapinto 11 de julio de 2015 23:19

Roger,

Experimenta isto:
Código COBOL:
  1. WORKING-STORAGE SECTION.
  2. 01 ScreenWidth   PIC S9(9) COMP-5.
  3. 01 ScreenHeight  PIC S9(9) COMP-5.
  4. 01 ScreenScale   PIC S9(4) COMP-5.
  5. PROCEDURE DIVISION.
  6. * Specify the scale desired -
  7. *  Pixels in this example
  8.     MOVE 0 To ScreenScale
  9.     INVOKE MainForm "GetScreenSize" USING ScreenWidth ScreenHeight ScreenScale

As variáveis são:
ScreenWidth: Returns the width of the screen.
ScreenHeight: Returns the height of the screen.
ScaleMode: The units to be used. If omitted, PowerCOBOL uses the ScaleMode value. Use the values (with equivalent constants)

Código:

0 – Pixels  (POW-SCALEPIXELS)
1 - 1/100mm (POW-SCALEHIMETRIC)
2 - 1/1000inch  (POW-SCALEHIENGLISH)
3 - 1/20Points  (POW-SCALETWIPS)

Un Saludo,
Rui

Añadido despues de 8 minutos
Roger,
Se quiseres a área disponível:

Código COBOL:
  1. Example:
  2. WORKING-STORAGE SECTION.
  3. 01 ScreenLeft     PIC S9(9) COMP-5.
  4. 01 ScreenTop      PIC S9(9) COMP-5.
  5. 01 ScreenWidth    PIC S9(9) COMP-5.
  6. 01 ScreenHeight   PIC S9(9) COMP-5.
  7. 01 ScreenScale    PIC S9(4) COMP-5.
  8. PROCEDURE       DIVISION.
  9. * Specify the scale desired -
  10. *  Pixels in this example
  11.    MOVE 0 TO ScreenScale
  12.    INVOKE MainForm "GetWorkArea" USING ScreenLeft  ScreenTop ScreenWidth
  13.            ScreenHeight ScreenScale
  14.  

Acquires the dimensions of the available display area on the screen - the screen size, less areas occupied by the task bar(s). Uses the units defined in the ScaleMode parameter.

Saludos,
Rui

Hrmcobol 12 de julio de 2015 03:31

Hola Amigo, yo incluyo estas lineas en el open de la pantalla

Código COBOL:
  1. 01  V-Width  PIC 9(006).
  2. 01  V-Height PIC 9(006).  
  3.      INVOKE POW-SELF "GetScreenSize" USING V-Width V-Height.
  4.      IF V-Height < 800 INVOKE POW-SELF "ShowForm" USING POW-SWSHOWMAXIMIZED.

También tengo una opción que si el operador digita F12 yo hago el MAXIMIZE.

Saludos

Roger 12 de julio de 2015 22:44

Rui
da un un error en "MainForm" reeplazo esto por el nombre del form??
probare las opciones.

Kuk 12 de julio de 2015 23:51

Roger, en vez de MainForm mete POW-SELF ;)


La franja horaria es GMT +2. Ahora son las 00:16.

Powered by: vBulletin, Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.