6. PowerCOBOL Programmer's Guide

  • Upload
    edassac

  • View
    277

  • Download
    16

Embed Size (px)

Citation preview

  • Microsoft Windows

    Microsoft Windows 95

    Microsoft Windows NT

    PowerCOBOL Objects

    Programmers Guide 3.0

  • Second Edition: March 1997

    The contents of this manual may be revised without prior notice. No part ofthis document may be reproduced or transmitted in any form or by anymeans, electronic or mechanical, for any purpose, without the expresswritten permission of Fujitsu Limited.

    1996, 1997 Fujitsu Limited. All Rights Reserved.

  • PowerCOBOL Objects Programmers Guide iii

    Preface

    PowerCOBOL 3.0 (referred to as PowerCOBOL throughout thismanual) is a graphical application development environmentdesigned for COBOL programmers creating applications withWindows graphical user interfaces (GUI). This manual:

    describes the PowerCOBOL objects items

    describes the attributes available for each object item

    describes the methods that can be applied to each object item

    Audience

    This manual is intended for programmers using PowerCOBOL todevelop windows applications. We recommend thatprogrammers also refer to the PowerCOBOL Users Guide.

    How this Manual is Organized

    This manual contains the following information:Power COBOL Object ItemsPowerCOBOL Object AttributesPowerCOBOL Methods

  • iv PowerCOBOL Objects Programmers Guide

    Conventions Used in This Manual

    Example of convention Descriptionsetup Characters you enter appear in bold.Program-name Underlined text indicates a placeholder

    for information you supply.

    ENTER Small capital letters are used for thename of keys and key sequences suchas ENTER and CTRL+R. A plus sign(+) indicates a combination of keys.

    Ellipses indicate the item immediatelypreceding can be specified repeatedly.

    Edit, Literal Names of menus and options appearwith the initial letter capitalized.

    [def] Indicates that the enclosed item may beomitted.

    {ABC|DEF} Indicates that one of the enclosed itemsdelimited by | is to be selected.

    CHECKWITH PASCAL LINKAGEALLPARAGRAPH-IDCOBOLALL

    Commands, statements, clauses, andoptions you enter or select appear inuppercase. Program section names, andsome proper names also appear inuppercase. Underlined text indicatesthe default.

    PROCEDURE DIVISION : ADD 1 TO POW-FONTSIZE OF LABEL1. IF POW-FONTSIZE OF LABEL1 > 70 THEN MOVE 1 TOW POW-FONTSIZE OF LABEL1. END-IF.

    This font is used for examples ofprogram code.

    The sheet acts as an application window. Italics are occasionally used foremphasis.

    FORM RTS Users GuideSee Compile Options in Chapter 5.

    References to other publications orsections within publications are inquotation marks.

  • PowerCOBOL Objects Programmers Guide v

    Related Manuals

    Related documentation is listed below:

    When creating a user program in PowerCOBOL:PowerCOBOL Users Guide

    When creating a user program in COBOL:COBOL85 Users GuideCOBOL85 Reference Manual

    Information on related topics, such as the DDE and OLE functions of theMicrosoft Windows operating system, would also be helpful.

  • vi PowerCOBOL Objects Programmers Guide

    Trademarks

    MS-DOS is a registered trademark of Microsoft Corporation.Microsoft is a registered trademark of Microsoft Corporation.Windows is a registered trademark of Microsoft Corporation.Windows 95 is a trademark of Microsoft Corporation.Windows NT is a trademark of Microsoft Corporation.

  • PowerCOBOL Objects Programmers Guide vii

    Contents

    PowerCOBOL Object Items ................................................................................1

    Simple Animation.......................................................................................2

    Bitmap Button.............................................................................................4

    Check Button...............................................................................................8

    Combo Box................................................................................................ 10

    Date............................................................................................................ 13

    DB Access .................................................................................................. 15

    DDE ........................................................................................................... 20

    Directory List ............................................................................................ 24

    Drive List................................................................................................... 26

    Edit............................................................................................................. 28

    Excel Connection ...................................................................................... 30

    Extend Image ............................................................................................ 32

    File List ...................................................................................................... 34

    Function Key............................................................................................. 36

    Graph......................................................................................................... 38

    Group Box ................................................................................................. 40

    Horizontal Scroll Bar ................................................................................ 41

    Image ......................................................................................................... 43

    Label........................................................................................................... 44

    List Box ...................................................................................................... 46

    MCI(Media control interface) .................................................................. 49

    Menu Bar ................................................................................................... 52

  • viii PowerCOBOL Objects Programmers Guide

    Metafile ......................................................................................................54

    OLE ............................................................................................................55

    PICTURE Edit ...........................................................................................57

    Print............................................................................................................59

    Push Button...............................................................................................66

    Radio Button..............................................................................................68

    Rectangle ...................................................................................................70

    Selection Box..............................................................................................71

    Sheet...........................................................................................................77

    Sound .........................................................................................................80

    Table...........................................................................................................81

    Timer..........................................................................................................87

    Vertical Scroll Bar......................................................................................88A Note of Caution When Using Excel............................................................90Advanced usage of DDE items.......................................................................91

    PowerCOBOL Object Attributes ......................................................................93

    ExcelCSV format ..............................................................................................94POW-ACTIVATE .............................................................................................95POW-ARCH .....................................................................................................96POW-BACKCOLOR ........................................................................................97POW-BACKCOLOR(a b)...............................................................................100POW-BORDER ...............................................................................................102POW-BOTTOMMARGIN..............................................................................103POW-CHECK .................................................................................................105POW-CLICKCOL...........................................................................................107POW-CLICKROW..........................................................................................108POW-COL.......................................................................................................109POW-COLCAPTION.....................................................................................110POW-COLENABLE .......................................................................................111POW-COLS.....................................................................................................113POW-COLTEXTPOS(a) .................................................................................114

  • PowerCOBOL Objects Programmers Guide ix

    POW-COLWIDTH(a) .................................................................................... 116POW-COMMANDLINE ............................................................................... 117POW-COUNT ................................................................................................ 118POW-CURFIELDNO..................................................................................... 120POW-CURSOR............................................................................................... 121POW-DATA ................................................................................................... 122POW-DATACOLOR...................................................................................... 123POW-DATE.................................................................................................... 124POW-DBCONDITION .................................................................................. 125POW-DBDATABASE .................................................................................... 127POW-DBDATASOURCE .............................................................................. 128POW-DBMANUALCOMMIT ...................................................................... 129POW-DBPASSWORD.................................................................................... 131POW-DBREADONLY ................................................................................... 132POW-DBTABLENAME................................................................................. 134POW-DBUSERID ........................................................................................... 135POW-DDEDATA........................................................................................... 136POW-DDEDATALEN ................................................................................... 137POW-DDEDATAOFFSET............................................................................. 138POW-DDEDATASTYLE ............................................................................... 139POW-DDEFORMAT...................................................................................... 140POW-DDEITEM............................................................................................. 142POW-DDELINKSTYLE ................................................................................. 143POW-DDESERVICE ...................................................................................... 144POW-DDETIMEOUT .................................................................................... 145POW-DDETOPIC........................................................................................... 146POW-DEFBUTTON....................................................................................... 147POW-ENABLE ............................................................................................... 148POW-FILENAME .......................................................................................... 150POW-FONTSIZE............................................................................................ 151POW-GRAPHSTYLE ..................................................................................... 153POW-HEADSTRING..................................................................................... 155POW-HIDDEN............................................................................................... 157POW-ICON .................................................................................................... 158POW-IMAGEMODE ..................................................................................... 159POW-IMAGENAME ..................................................................................... 161POW-IMAGEPOS .......................................................................................... 163

  • x PowerCOBOL Objects Programmers Guide

    POW-IMAGESIZE .........................................................................................164POW-INTERVAL ...........................................................................................165POW-ITALIC..................................................................................................166POW-LARGESTEP.........................................................................................168POW-LEFTMARGIN .....................................................................................170POW-LOWER.................................................................................................171POW-MASK ...................................................................................................172POW-MAX......................................................................................................173POW-MCIDEVICE.........................................................................................175POW-MCIELEMENT.....................................................................................176POW-MCIMEDIALEN..................................................................................177POW-MCIMEDIAPOS ..................................................................................178POW-MCIRECEIVE.......................................................................................179POW-MCISTRING.........................................................................................181POW-MCITIMEFORMAT.............................................................................182POW-MENUBREAK......................................................................................184POW-METANAME .......................................................................................186POW-MIN.......................................................................................................188POW-MULTITEXT.........................................................................................189POW-MULTITEXT8.......................................................................................190POW-NORMAL .............................................................................................191POW-NUMDATA..........................................................................................193POW-NUMERIC ............................................................................................194POW-NUMERIC(a b).....................................................................................196POW-PAGENOFORMAT .............................................................................198POW-PAPERDIRECT....................................................................................200POW-PAPERTYPE.........................................................................................202POW-PATH ....................................................................................................204POW-POSITION ............................................................................................205POW-PRNENABLE .......................................................................................208POW-PUNCHMARGIN................................................................................210POW-READONLY.........................................................................................211POW-RECORDFORM ...................................................................................212POW-RIGHTMARGIN..................................................................................214POW-ROUND ................................................................................................215POW-ROW .....................................................................................................216POW-ROWCAPTION....................................................................................217

  • PowerCOBOL Objects Programmers Guide xi

    POW-ROWS ................................................................................................... 218POW-SCRPOSITION..................................................................................... 219POW-SELECT................................................................................................. 221POW-SELFLAG(a) ......................................................................................... 223POW-SELRECORDSTR(a) ............................................................................ 224POW-SELSTRING.......................................................................................... 225POW-SELSTRING256.................................................................................... 226POW-SHEETNAME ...................................................................................... 227POW-SMALLSTEP ........................................................................................ 228POW-SOUNDNAME .................................................................................... 230POW-STRETCH ............................................................................................. 231POW-STRIKE ................................................................................................. 233POW-STRING ................................................................................................ 235POW-STRING(a)............................................................................................ 236POW-STRING256(a) ...................................................................................... 237POW-SYSTEM................................................................................................ 238POW-TEXT ..................................................................................................... 239POW-TEXT(a b).............................................................................................. 241POW-TEXTBKCOLOR .................................................................................. 242POW-TEXTBKCOLOR(a b)........................................................................... 244POW-TEXTCOLOR ....................................................................................... 246POW-TEXTCOLOR(a b)................................................................................ 248POW-TEXTPOS.............................................................................................. 250POW-TRANSPARENT.................................................................................. 252POW-UNDERLINE ....................................................................................... 253POW-UPMARGIN......................................................................................... 255POW-UPPER .................................................................................................. 256POW-VISIBLE ................................................................................................ 257POW-WEIGHT............................................................................................... 259

    PowerCOBOL Methods................................................................................... 261

    ADDSTRING.................................................................................................. 263ADDSTRING256............................................................................................ 265ADVISEDDE .................................................................................................. 266ALARM .......................................................................................................... 268CHANGEDDEITEM...................................................................................... 270CLEARLIST .................................................................................................... 272

  • xii PowerCOBOL Objects Programmers Guide

    CLOSEDB........................................................................................................274CLOSEDDE.....................................................................................................275CLOSEDEVICE ..............................................................................................277CLOSEEXCELSHEET ....................................................................................279CLOSEPRINTER ............................................................................................281CLOSESHEET.................................................................................................282COMMITDB ...................................................................................................284CONNECTEXCEL .........................................................................................286DELETERECORD ..........................................................................................288DELETESTRING ............................................................................................290DISCONNECTEXCEL ...................................................................................292DISPLAYMESSAGE ......................................................................................293EXECAPL........................................................................................................296EXECUTEDDECMD......................................................................................298EXECUTEDDECMD1024 ..............................................................................300EXECUTEDDECMD512 ................................................................................301GETCELLNUMERIC .....................................................................................302GETCELLTEXT ..............................................................................................304GETFILENAME .............................................................................................306GETHOTDATA..............................................................................................309GETSCREENSIZE ..........................................................................................311INITIATEDDE................................................................................................313LOADFILE......................................................................................................315NEWEXCELSHEET .......................................................................................317OPENDB .........................................................................................................318OPENDDE ......................................................................................................320OPENDEVICE................................................................................................322OPENEXCELSHEET......................................................................................324OPENPRINTER..............................................................................................326OPENSHEET ..................................................................................................328PAUSE.............................................................................................................330PAUSEDEVICE ..............................................................................................332PLAY ...............................................................................................................334PLAYDEVICE.................................................................................................335POKEDATA....................................................................................................337POKEDATA1..................................................................................................339POKEDATA4..................................................................................................341

  • PowerCOBOL Objects Programmers Guide xiii

    POKEDATA8 ................................................................................................. 343READNEXTRECORD ................................................................................... 345REQUESTDATA ............................................................................................ 347RESUMEDEVICE........................................................................................... 349REWRITERECORD ....................................................................................... 351ROLLBACKDB............................................................................................... 353SAVEEXCELSHEET ...................................................................................... 355SAVEFILE....................................................................................................... 356SELECTCELL ................................................................................................. 358SELECTRECORDS......................................................................................... 360SETCELLNUMERIC...................................................................................... 362SETCELLTEXT ............................................................................................... 364SETFOCUS ..................................................................................................... 366SHOWSHEET................................................................................................. 368STOPDEVICE................................................................................................. 370TERMINATEDDE.......................................................................................... 372UNADVISEDDE ............................................................................................ 374WRITERECORD ............................................................................................ 376WRITESHEET ................................................................................................ 378

    Index................................................................................................................... 381

  • xiv PowerCOBOL Objects Programmers Guide

  • PowerCOBOL Object Items

    The PowerCOBOL object item list is as follows:

    Simple Animation

    Bitmap Button

    Check Button

    Combo Box

    Date

    Database (DB) Access

    DDE

    Directory List

    Drive List

    Edit

    Excel Connection

    Extend Image

    File List

    Function Key

    Graph

    Group Box

    Horizontal Scroll Bar

    Image

    Label

    List Box

    MCI

    Menu Bar

    Metafile

    OLE

    PICTURE Edit

    Print

    Push Button

    Radio Button

    Rectangle

    Selection Box

    Sheet

    Sound

    Table

    Timer

    Vertical Scroll Bar

  • 2 PowerCOBOL Objects

    Simple Animation

    Description

    Changes a bitmap file at regular intervals to display a simpleanimation.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Item position OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OK

    Events

    CLICK

    Occurs when the left mouse button is clicked.

    DBLCLICK

    Occurs when the left mouse button is double clicked.

    STARTANIME

    Occurs when the first frame of the animation has started.

    ENDANIME

    Occurs when the last frame of the animation has ended.

  • PowerCOBOL Objects 3

    Methods

    PLAY

    Plays the animation. In cases where the play is paused, startsplaying from the paused position.

    PAUSE

    Pauses the animation at the current frame.

  • 4 PowerCOBOL Objects

    Bitmap Button

    Description

    This item is a push button that can contain a bitmap and text. Aswell as the standard push button style elements, you can selectadditional style elements in the Bitmap Item Style dialog box.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text character string OKPOW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Character color OKPOW-TEXTBKCOLOR X(4) Character background color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Visible OKPOW-ENABLE S9(4) COMP-5 Enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Bold OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-DEFBUTTON S9(4) COMP-5 Default button OKPOW-IMAGENAME X(128) Image name OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CLICK

    Occurs when the mouse button is clicked or when the button hasfocus and the SPACE BAR or the ENTER key is pressed.

    The event can also be generated when the button does not havefocus if the POW-DEFBUTTON attribute is set to POW-ON, andthe ENTER key is pressed. In this case, the focus does not move. If

  • PowerCOBOL Objects 5

    an item that processes the ENTER key has focus, such as a multi-line Edit item, the CLICK event is not reported.

    Method

    SETFOCUS

    Sets the focus to the item.

    Using the Bitmap Button Item Style Dialog Box

    Text

    You can enter multiple lines of text.

    System color

    You can select whether the system color or the color specified inthe color box is used for the push button color.

    ON Displays the color specified in the system.

    OFF Displays the color specified in the color box (button surface:background color, text: character color, text background: highlightcolor). In addition, the frame is colored black, the light is white,and the shade is gray.

    Line

    Specify whether the bitmap and text are arranged horizontally orvertically.

    If only the bitmap or text is specified, the specified bitmap or text isdisplayed in the center regardless of the arrangement.

  • 6 PowerCOBOL Objects

    Disable Image

    Specify how to display the bitmap when the bitmap display buttonis invalid. When the system color is set to OFF, the bitmap isdisplayed as is.

    When the system color is set to OFF and "Non" is specified and youwant to invalidate display of the bitmap, prepare two types ofbitmaps. In other words, create bitmaps displayed in valid andinvalid modes respectively, then, use the POW-IMAGENAME tochange the bitmaps to switch between invalid and valid modes.

    Non: The bitmap is displayed as it is.

    Simple: Displayed in half-transparent mode (hatched buttonsurface color).

    3D: Displays a three dimensional bitmap image in gray and white.

    If the three dimensional bitmap does not display clearly, select"Non" or "Simple. "

  • PowerCOBOL Objects 7

    Map Color

    You can map a bitmap color to a system-defined button color. Upto 256 colors can be mapped.

    When the system color is on, the system-defined button color isused. When you want to match the bitmap color with the buttoncolor, select "Face Color" or "All Color. " When the system color isoff, color mapping is not performed.

    Non: Color mapping is not performed.

    Face Color: Maps the bitmap color for which the style dialogsurface color is specified to the button color specified by thesystem.

    All Color: Maps the black, light-gray, white, or gray portion of thebitmap to the button color specified by the system. When youwant to display characters and a three dimensional bitmap in thesystem-defined button color, select this item.

    Black Button character color

    Light gray Button surface color

    White Button light color

    Gray Button shade color

  • 8 PowerCOBOL Objects

    Check Button

    Description

    Used for selecting options. Several options can be selected byusing check buttons.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text character string OKPOW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-CHECK S9(4) COMP-5 Check type OKPOW-TEXTPOS S9(4) COMP-5 Text display position OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CLICK

    CLICK event occurs when the mouse is clicked on the check buttonor the check status is changed by pressing the SPACE BAR.

    The status of the check button can be determined by checking thevalue in POW-CHECK. The CLICK event does not occur if POW-ON is set to POW-CHECKin the event procedure.

  • PowerCOBOL Objects 9

    Method

    SETFOCUS

    Sets the focus to the item.

  • 10 PowerCOBOL Objects

    Combo Box

    Description

    A combo box is composed of a list box combined with an edit item.A combo box gives users the option of entering a string directly orselecting the string from a list.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string IGPOW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP- 5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-COUNT S9(4) COMP-5 Item count IGPOW-SELECT S9(4) COMP-5 Selected item number IGPOW-SELSTRING X(64) Selected string IGPOW-SELSTRING256 X(256) Selected string IGPOW-STRING X(64) string IG

    OCCURS 1 TO TIMES DEPENDING ON POW-COUNTPOW-STRING256 X(256) string IG

    OCCURS 1 TO TIMES DEPENDING ON POW-COUNTPOW-PRNENABLE S9(4) COMP-5 Print enable OK

  • PowerCOBOL Objects 11

    Events

    CHANGE

    Occurs when the edit item field is changed. This event will notoccur if you select drop down list as the style in the Combo BoxItem Style dialog box.

    SELCHANGE

    Occurs when a selected object in the list box is changed.

    EDIT(*1)

    Reported when the character entry field is placed into edit mode,i.e. the edit field of the combo box has focus.

    RETURN(*1)

    This event is reported when one of the following occurs:

    1) The ENTER key is pressed.

    2) The edit mode was cleared, i.e. the focus of the combo box wasreset.

    *1 This event is reported for combo boxes with edit parts (simpleand drop-down styles). This event can be reported by selecting anoption in the Combo Box Item Style dialog box.

    Methods

    ADDSTRING

    Adds a string to the list box.

  • 12 PowerCOBOL Objects

    ADDSTRING256

    Adds a string to the list box.

    DELETESTRING

    Deletes a string from the list box.

    CLEARLIST

    Deletes all strings from the list box.

    LOADFILE

    Loads the contents of the specified file into the list box.

    SAVEFILE

    Saves the list contents to a file.

    SETFOCUS

    Sets the focus to the item.

  • PowerCOBOL Objects 13

    Date

    Description

    Displays the current date, or a date set in your application, in oneof several selectable styles. The date is initialized to the currentdate when the application is started.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-DATE X(8) Date string IGPOW-POSITION X(8) Item position OKPOW-TEXTCOLOR X(4) Item text color OKPOW-TEXTBKCOLOR X(4) Item text back color OKPOW-BACKCOLOR X(4) Item background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-TEXTPOS S9(4) COMP-5 Text display position OKPOW-BORDER S9(4) COMP-5 Border OKPOW-TRANSPARENT S9(4) COMP-5 Transparent OKPOW-ROUND S9(4) COMP-5 Round OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CHANGE

    Occurs when the date is changed.

  • 14 PowerCOBOL Objects

    CLICK

    Occurs when the displayed date item is clicked.

    Method

    None.

  • PowerCOBOL Objects 15

    DB Access

    Description

    This item enables you to reference, update, add, and delete data byconnecting with a data source which supports open databaseconnectivity (ODBC). You can specify a data source, table, andfield to be extracted in the DB Access Item Style dialog box.

    Before using this item, you must define the data source in whichthe ODBC corresponding to the database product to be connectedis installed. For ODBC installation instructions, refer to therelevant ODBC manual. For details on the function of thedatabases to be connected, refer to each database products usersguide.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-DBDATASOURCE X(32) Data source name OKPOW-DBDATABASE X(128) Data base name OKPOW-DBUSERID X(32) User ID OKPOW-DBPASSWORD X(32) Password OKPOW-DBTABLENAME X(128) Name of the Database table OKPOW-DBCONDITION X(512) Character string used as

    extract condition OKPOW-DBMANUALCOMMIT S9(4) COMP-5 Commit mode OKPOW-DBREADONLY S9(4) COMP-5 Read only mode OK

    Event

    None.

  • 16 PowerCOBOL Objects

    Methods

    OPENDB

    Opens a data source.

    CLOSEDB

    Closes a data source.

    SELECTRECORDS

    Selects the record group you want to process.

    READNEXTRECORD

    Reads records one by one from the record group selected bySELECTRECORDS.

    WRITERECORD

    Adds one record to the table.

    REWRITERECORD

    Updates a record in the table.

    DELETERECORD

    Deletes a record in the table.

    COMMITDB

    Performs commit processing in manual commit mode.

  • PowerCOBOL Objects 17

    ROLLBACKDB

    Performs roll-back processing in manual commit mode.

    Using the DB Access Item Style Dialog Box

    Determine the style as follows:

    DB connection

    Specify the information required to connect to a data source.

    Table selection

    Select the table you want to process from the data source connectedin "DB connection".

    Extract information setting

    Select a field to be extracted from the table selected in "Tableselection". You can specify extraction conditions as required. Youcan also specify extraction conditions to limit the records to beread.

    Commit mode

    Specify commit mode. The default value is auto commit.

    Lock at record selection

    You can turn on the check box to lock a record to be extractedwhen SELECTRECORDS is called. The default value is unlock.

    Read only

    To update, delete, or add a record, set the check box to off. Thedefault value is read-only mode.

  • 18 PowerCOBOL Objects

    Record attribute setting

    You can double-click the mouse button to specify the required fieldin the extract field list. You can specify the following attributes:

    a) Record update or deletion key

    At update or deletion, the system determines the records to beprocessed depending on the value specified in this field. In otherthan read-only mode, one or more records must be specified.

    b) Record read order

    Records are read in the order in which the fields are specified.

    Restrictions

    The length of the field name that can be processed by this itemis limited to 30 bytes.

    A field having the same name as a COBOL reserved wordcannot be specified as a field to be extracted.

    A field having the same name as DUMMY-** cannot bespecified as a field to be extracted.

    A floating-point field cannot be specified as a field to beextracted.

    A numeric field having 18-digit or more precision cannot bespecified as a field to be extracted.

    An underline "_" in a field name is converted to "-". You musttherefore use "-" in the procedure code.

    You can select up to 16 fields.

  • PowerCOBOL Objects 19

    About date and time

    The DB access item has the following date/time data.

    Kind Definition Format

    TIME Form X(8) "hh:mm:ss" (time data)DATE Form X(10) "yyyy/mm/dd" (date data)TIMESTAMP Form X(16) "yyyy/mm/dd hh:mm"

    (date/time data)TIMESTAMP Form X(19) "yyyy/mm/dd hh:mm:ss"

    (date/time data)

  • 20 PowerCOBOL Objects

    DDE

    Description

    This item is the client function of DDE (Dynamic Data Exchange)as supported by Windows. Using the DDE item, data can beobtained from programs supporting the DDE server function.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-DDESERVICE X(128) Service name of DDE serverOKPOW-DDETOPIC X(128) Topic name of DDE serverOKPOW-DDEITEM X(128) Item name of DDE serverOKPOW-DDEFORMAT X(32) Format of DDE transfer dataOKPOW-DDEDATASTYLE S9(4) COMP-5 Style of DDE transfer dataOKPOW-DDEDATALEN S9(9) COMP-5 Length of transfer dataNGPOW-DDEDATA X(4096) DDE transfer dataNG

    Events

    DDECHANGE

    Occurs when the DDE server data is updated. When this is done,the data length transferred from the DDE server is set in POW-DDEDATALEN, and the data transferred from the DDE server isset in POW-DDEDATA. The maximum size of data which can betransferred is 4096 bytes in the event procedure.

  • PowerCOBOL Objects 21

    Methods

    ADVISEDDE

    Begins the advise loop with the DDE server.

    CHANGEDDEITEM

    Begins the advise loop with a new DDE item name.

    CLOSEDDE

    Ends the conversation with the DDE server.

    EXECAPL

    Executes the DDE server application.

    EXECUTEDDECMD

    Executes a command supported by the DDE server.

    EXECUTEDDECMD512

    Executes a command supported by the DDE server.

    EXECUTEDDECMD1024

    Executes a command supported by the DDE server.

    GETHOTDATA

    Obtains data from the DDE server when the DDECHANGE eventoccurs at the hot link.

  • 22 PowerCOBOL Objects

    INITIATEDDE

    Initiates the DDE conversation with the DDE server.

    OPENDDE

    Opens the DDE conversation with DDE server.

    POKEDATA

    Sets the data in the DDE server. (maximum 256 bytes)

    POKEDATA1

    Sets the data in the DDE server. (maximum 1024 bytes)

    POKEDATA4

    Sets the data in the DDE server. (maximum 4096 bytes)

    POKEDATA8

    Sets the data in the DDE server. (maximum 8192 bytes)

    REQUESTDATA

    Gets the current data from the DDE server.

  • PowerCOBOL Objects 23

    TERMINATEDDE

    Closes the DDE conversation with the DDE server.

    UNADVISEDDE

    Ends the advise loop with the DDE server.

  • 24 PowerCOBOL Objects

    Directory List

    Description

    A list box that displays the current directory list and can be used tochange the directory.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-COUNT S9(4) COMP-5 Item count IGPOW-SELECT S9(4) COMP-5 Selected item number IGPOW-SELSTRING X(64) Selected string IGPOW-STRING X(64) string IG

    OCCURS 1 TO TIMES DEPENDING ON POW-COUNTPOW-PATH X(128) New path string IG

    Events

    SELCHANGE

    Occurs when the directory name is selected from a list or by thechange directory name key operation. The result is that the currentdirectory is not changed (the CHANGE event does the changing).

  • PowerCOBOL Objects 25

    CHANGE

    Occurs when a directory in the displayed directory list is doubleclicked or the directory name in POW-PATH is set. At the sametime the current directory is set to the selected directory. Careshould be taken when the CHANGE event occurs before theSELCHANGE event.

    Method

    SETFOCUS

    Sets the focus to the item.

  • 26 PowerCOBOL Objects

    Drive List

    Description

    The drive list is a combo box displaying a list of disk drives. It isused to change drives when selecting files.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 I tem enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-COUNT S9(4) COMP-5 Item count IGPOW-SELECT S9(4) COMP-5 Selected item number IGPOW-SELSTRING X(64) Selected string IGPOW-STRING X(64) string IG

    OCCURS 1 TO TIMES DEPENDING ON POW-COUNT

    Events

    SELCHANGE

    Occurs when a drive name in the list is clicked or the selected drivename is changed by a key operation. The value of POW-SELSTRINGcan be used to obtain the drive name of the selecteddirectory.

  • PowerCOBOL Objects 27

    Method

    SETFOCUS

    Sets the focus to the item.

  • 28 PowerCOBOL Objects

    Edit

    Description

    Item used to input and edit a text string.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string OKPOW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-BORDER S9(4) COMP-5 Display border OKPOW-READONLY S9(4) COMP-5 Print enable OKPOW-MULTITEXT X(4096) Multi-line text string OKPOW-MULTITEXT8 X(8192) Multi-line text string OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CHANGE

    Occurs when the displayed string is modified or whenever acharacter is added. Care should be taken in developing proceduresused to verify text strings.

  • PowerCOBOL Objects 29

    EDIT(*1)

    Reported when the edit item gains focus.

    RETURN(*1)

    Reported when the edit item has focus and:

    1. The ENTER key is pressed or:

    2. The focus is moved to another item.

    *1 You can select if this event is to be reported in the style eventdialog.

    Methods

    LOADFILE

    Loads the list contents from a file.

    SAVEFILE

    Saves text or list contents to a file.

    SETFOCUS

    Sets the focus to the item.

  • 30 PowerCOBOL Objects

    Excel Connection

    Description

    This item displays Excel data. It is used to reference and changeExcel data. If you select the Excel sheet file in the Excel ConnectionItem Style dialog box, the selected sheet is automatically opened. Ifyou do not select the Excel file in the Excel Connection Item Styledialog box, the sheet changes to create new mode. You can thenexecute Excel commands such as New, Open, Save, and Close. Touse an Excel Connection item, you must specify the name of thedirectory containing the Excel execution file (EXCEL.EXE) in thePATH environment variable. This must be performed beforestarting Windows. When you execute Windows withoutspecifying the directory name in PATH, item initialization will failand subsequent operations will not be performed correctly.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-SHEETNAME X(128) Excel sheet name OKPOW-TEXT X(256) Text character string IG

    OCCURS 1 TO 255 TIMES DEPENDINGON Number of linesOCCURS 1 TO 2000 TIMES DEPENDINGON Number of rows

    POW-NUMERIC S9(14)V9(4) Numeric data IGCCURS 1 TO 255 TIMES DEPENDINGON Number of linesOCCURS 1 TO 2000 TIMES DEPENDINGON Number of rows

    Events

    None.

  • PowerCOBOL Objects 31

    Methods

    CONNECTEXCEL

    Starts a conversation with an Excel sheet.

    DISCONNECTEXCEL

    Ends a conversation with an Excel sheet.

    NEWEXCELSHEET

    Executes the Excel New command.

    OPENEXCELSHEET

    Executes the Excel Open command.

    SAVEEXCELSHEET

    Executes the Excel Save command.

    CLOSEEXCELSHEET

    Executes the Excel Close command.

  • 32 PowerCOBOL Objects

    Extend Image

    Description

    This item is used to display JFIF (JPEG) files (.JIF or .JPG), TIFFfiles (.TIF), and Photo CD image files (.PCD). It is also used todisplay icon files (.ICO), and Windows bitmap files (.BMP, .DIB, or.RLE).

    For Photo CD image files, you can specify only the file namedIMGnnnn.PCD (nnnn: any number). This file is stored in the\PHOTO_CD\IMAGES directory on the Photo CD. One PCD filemay contain images of various sizes and colors. You can specifythe size and number of colors you want to display on the stylemenu during design.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Visible OKPOW-ENABLE S9(4) COMP-5 Enable OKPOW-BORDER S9(4) COMP-5 Border OKPOW-IMAGENAME X(128) Image name OKPOW-IMAGEMODE S9(4) COMP-5 Image mode OKPOW-IMAGESIZE X(4) Image size IGPOW-IMAGEPOS X(4) Image position IGPOW-PRNENABLE S9(4) COMP-5 Printing enable OK

  • PowerCOBOL Objects 33

    Events

    CLICK

    Reported when the left button of the mouse is clicked on the extendimage item.

    DBLCLICK

    Reported when the left button of the mouse is double clicked onthe extend image item.

    CHANGE

    Reported when the displayed image is changed.

    Method

    None.

  • 34 PowerCOBOL Objects

    File List

    Description

    A list box that displays a list of the files in the current directory. Itis used to select a file.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-MASK X(12) Mask set OKPOW-READONLY S9(4) COMP-5 Read only file OKPOW-HIDDEN S9(4) COMP-5 Hidden file OKPOW-SYSTEM S9(4) COMP-5 System file OKPOW-NORMAL S9(4) COMP-5 Normal file OKPOW-ARCH S9(4) COMP-5 Archive file OKPOW-COUNT S9(4) COMP-5 Item count IGPOW-SELECT S9(4) COMP-5 Selected item number IGPOW-SELSTRING X(64) Selected string IGPOW-STRING X(64) string IG

    OCCURS 1 TO 32767 TIMES (*1)DEPENDING ON POW-COUNT

    POW-PATH X(128) New path string IG

    (*1) 32767 is the theoretical maximum. The actual maximum of the rangedepends on system resources.

  • PowerCOBOL Objects 35

    Events

    SELCHANGE

    Occurs when a file in the file list is double clicked or the selectedfile is changed by a key operation. The name of the selected file iscontained in POW-SELSTRING for this event procedure.

    DBLCLICK

    Occurs when a file in the file list is double clicked. In this eventprocedure the selected string can be obtained from POW-SELSTRING and used as the file name to be processed.

    The SELCHANGE event is generated before the DBLCLICK eventin situations where both events apply. Be aware that both eventscan be generated by a single user action.

    Method

    SETFOCUS

    Sets the focus to the item.

  • 36 PowerCOBOL Objects

    Function Key

    Description

    This item is used to capture function keys (PF1 ~ PF24).

    Note: PF10 cannot be used.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string OKPOW-POSITION X(8) Item position OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

  • PowerCOBOL Objects 37

    Event

    CLICK

    Occurs when the function key item is clicked or the configuredfunction key is pressed. Focus only moves to the clicked functionkey item when the mouse is used, not when the function key ispressed.

    Method

    SETFOCUS

    Sets the focus to the item.

  • 38 PowerCOBOL Objects

    Graph

    Description

    Used to display numerical data as a graph. There are four graphtypes:

    vertical bar

    horizontal bar

    line

    pie chart.

    When defining a graph item you can specify the graph type, thenumber of data items to be displayed in the graph, the scale(upper/lower limit) of the graph, interval value or percentagedisplay for pie charts.

    At run time the data value and the color to displayed the graph canbe set.

    There are no events for the graph item.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Item position OKPOW-TEXTCOLOR X(4) Item text color OKPOW-BACKCOLOR X(4) Item background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-NUMDATA S9(4) COMP-5 Graph data count OKPOW-UPPER S9(9) COMP-5 Data upper value OKPOW-LOWER S9(9) COMP-5 Data lower value OKPOW-DATA S9(4) COMP-5 Data value IG

    OCCURS 1 TO 256 TIMESDEPENDING ON POW-NUMDATA

    POW-DATACOLOR X(4) Data color IGOCCURS 1 TO 256 TIMES

  • PowerCOBOL Objects 39

    DEPENDING ON POW-NUMDATAPOW-GRAPHSTYLE S9(4) COMP-5 Graph kind OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Event

    None.

    Method

    None.

  • 40 PowerCOBOL Objects

    Group Box

    Description

    A rectangular box used to group several related items or buttons.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string OKPOW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Event

    None.

    Method

    None.

  • PowerCOBOL Objects 41

    Horizontal Scroll Bar

    Description

    The horizontal scroll bar can be used to select a specific valuewithin a continuous value range.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-MAX S9(4) COMP-5 Maximum value OKPOW-MIN S9(4) COMP-5 Minimum value OKPOW-LARGESTEP S9(4) COMP-5 Large step OKPOW-SMALLSTEP S9(4) COMP-5 Small step OKPOW-SCRPOSITION S9(4) COMP-5 Current value OK

  • 42 PowerCOBOL Objects

    Events

    CHANGE

    Occurs when the position of the scroll box is changed.

    ENDSCROLL

    Occurs when the scroll ends or the mouse button is released.

    Method

    SETFOCUS

    Sets the focus to the item.

  • PowerCOBOL Objects 43

    Image

    Description

    Used to display bitmaps. The image can be supplied from abitmap resource or bitmap file. When using a resource name theresource file name must be registered in the application project.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-IMAGENAME X(128) Image name OKPOW-BORDER S9(4) COMP-5 Display border OKPOW-STRETCH S9(4) COMP-5 Stretch mode OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CLICK

    Occurs when the mouse is clicked on the image item.

    CHANGE

    Occurs when the displayed image is changed.

    Method

    None.

  • 44 PowerCOBOL Objects

    Label

    Description

    Used to display a text string.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string OKPOW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-TEXTPOS S9(4) COMP-5 Text display position OKPOW-BORDER S9(4) COMP-5 Display border OKPOW-TRANSPARENT S9(4) COMP-5 Background transparent OKPOW-ROUND S9(4) COMP-5 Round border OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CLICK

    Occurs when the label item is selected.

    CHANGE

    Occurs when the displayed text string is modified.

  • PowerCOBOL Objects 45

    Method

    None.

  • 46 PowerCOBOL Objects

    List Box

    Description

    Displays a list of items from which an entry can be selected.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-COUNT S9(4) COMP-5 Item cou nt IGPOW-SELECT S9(4) COMP-5 Selected item number IGPOW-SELSTRING X(64) Selected string IGPOW-SELSTRING256 X(256) Selected string IGPOW-SELFLAG S9(4) COMP-5 Selected flag IG

    OCCURS 1 TO TIMES DEPENDING ON POW-COUNTPOW-STRING X(64) string IG

    OCCURS 1 TO TIMES DEPENDING ON POW-COUNTPOW-STRING256 X(256) string IG

    OCCURS 1 TO TIMES DEPENDING ON POW-COUNTPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    DBLCLICK

    Occurs when an entry in the list box is double clicked.

  • PowerCOBOL Objects 47

    Note: If the entry was not already selected, the SELCHANGEevent occurs before the DBLCLICK event.

    SELCHANGE

    Occurs when the selection entry in a list box is changed.

    Methods

    ADDSTRING

    Adds a string to the list box.

    ADDSTRING256

    Adds a string to the list box.

    DELETESTRING

    Deletes a string from the list box.

    CLEARLIST

    Deletes all strings from the list box.

    LOADFILE

    Loads the contents of the specified file into the list box.

    SAVEFILE

    Saves the list contents in a file.

  • 48 PowerCOBOL Objects

    SETFOCUS

    Sets the focus to the item.

  • PowerCOBOL Objects 49

    MCI(Media control interface)

    Description

    Controls media by setting the MCI command in Windows. Youcontrol the media by using the available methods. For example,you can play an AVI file in Video for Windows and play musicfrom a CD with the MCI item.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-MCISTRING X(256) MCI string to set IGPOW-MCIRECEIVE X(256) MCI retu rn information IGPOW-MCIDEVICE X(32) Device name to open OKPOW-MCIELEMENT X(128) Element of compound device OKPOW-MCIMEDIALEN X(8) Media total length IGPOW-MCIMEDIAPOS X(8) Media current position IGPOW-MCITIMEFORMAT S9(4) COMP-5 Media time format IG

    Event

    None.

    Methods

    OPENDEVICE

    Opens the device and the element name specified for the item. Ifthe device is already open, it closes the device then reopens it.

  • 50 PowerCOBOL Objects

    CLOSEDEVICE

    Closes the device.

    PLAYDEVICE

    Plays the device.

    STOPDEVICE

    Stops the device.

    PAUSEDEVICE

    Pauses the device. The difference between this method and theSTOPDEVICE method depends on the device.

    RESUMEDEVICE

    Restarts a paused device.

    Note

    Attributes and methods that are adapted to the MCI item can beignored by the device.

    Compound device

    A device that needs a data file. A simple device does not need thedata file. The data file used for playing the compound device iscalled a device element.

  • PowerCOBOL Objects 51

    Element

    Indicates the device element is related to the compound device.

    For example, there can be an AVI file for Video for Windows and aWAV file of sound data, and so on, in the device element.

  • 52 PowerCOBOL Objects

    Menu Bar

    Description

    This item is used to define the menu bar items for a sheet.

    A menu consists of a top-level menu, drop-down menus, andcascaded menus.

    The top-level menu displays the titles for each of the drop-downmenus. The drop-down menus are displayed below the menu bar.The cascaded menus are displayed to the right of the drop-downmenus.

    You can specify an attribute for each menu item, excluding aseparator item.

    Note: The menu bar item icon does not appear in the Item Box; itis located on the PowerCOBOL control bar.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Title character string OKPOW-VISIBLE S9(4) COMP-5 Visible OKPOW-ENABLE S9(4) COMP-5 Enable OKPOW-CHECK S9(4) COMP-5 Check state OKPOW-MENUBREAK S9(4) COMP-5 Loopback OK

  • PowerCOBOL Objects 53

    Event

    CLICK

    Reported when you click a menu item or press a set shortcut key.This event is not reported if the menu item displays a child menu.

    Method

    None.

  • 54 PowerCOBOL Objects

    Metafile

    Description

    Displays an image held in a metafile. There are 3 kinds ofmetafiles, the standard metafile(.WMF), the arrangeablemetafile(.WMF) and the capable metafile(.CLP) saved on aclipboard.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Item position OKPOW-BACKCOLOR X(4) Item back color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-BORDER S9(4) COMP-5 Border OKPOW-METANAME X(128) Metafile name OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CHANGE

    Occurs when the displayed content of the metafile is changed.

    CLICK

    Occurs when the displayed metafile item is clicked.

    Method

    None.

  • PowerCOBOL Objects 55

    OLE

    Description

    Currently, the OLE item is only supported in the 16 bit product.

    The client function of OLE (Object Linking and Embedding) issupported by the Windows system. Using OLE items you canpaste documents and images created by other applications intoPowerCOBOL sheets.

    At runtime, the standard OLE menu is displayed by right clickingon the OLE item. Then the actual OLE operation (link or fill) isselected from that menu.

    When using the OLE item, a back-up OLE file is made in the samedirectory. The back-up file name is [Item-name.OLE]. The name tobe used in the OLE item should be a legal 8-character file name.

    For additional details about the OLE function and usage notes,refer to the programming guide for Windows 3.1.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Item position OKPOW-BACKCOLOR X(4) Item back color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Event

    None.

  • 56 PowerCOBOL Objects

    Method

    None.

  • PowerCOBOL Objects 57

    PICTURE Edit

    Description

    This is an edit field in which the data is displayed according to aCOBOL edited PICTURE string. Text input to this item isdisplayed by editing the text based on the PICTURE string.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string OKPOW-POSITION X(8) Item position OKPOW-TEXTCOLOR X(4) Item text color OKPOW-TEXTBKCOLOR X(4) Item text back color OKPOW-BACKCOLOR X(4) Item background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-NUMERIC S9(14)V9(4) Numeric value OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    EDIT

    The EDIT event occurs in the following situations:

    When the user starts to enter characters to the item

    When the item has focus and the user presses the ENTER key

    When the item is double clicked

  • 58 PowerCOBOL Objects

    If the "Movement when focus is acquired" checkbox is checked inthe PICTURE Edit Item (Extend) Style dialog box, the EDIT event isalso reported when the PICTURE Edit item gets focus.

    RETURN

    This event is reported when you press the ENTER key during textediting or the focus is reset or moved to another item on the samesheet. This event is also reported when the size of the characterstring being entered reaches the valid character string length asdefined by the PICTURE string.

    You can change the conditions that generate this event by using theRETURN Event Generation Condition dialog box (displayed by theEvent button in the PICTURE Edit Item Style dialog box).

    Method

    SETFOCUS

    Sets the focus to the item.

  • PowerCOBOL Objects 59

    Print

    Description

    By placing this item on a sheet you enable the use of the associatedmethods to print the sheet. Only those items that have theattribute POW-PRNENABLE set to POW-ON are printed. POW-PRNENABLE can be set by checking the Print check box in thePrint Item Style dialog box, or it can be set in the application code.Items that can be printed are listed below, grouped according tothe manner in which they are printed.

    (1) Items printed as displayed on the screen

    - Label - Edit (not multi-line entry)

    - Push Button - Radio Button

    - Check Button - Group Box

    - Image - Rectangle

    - PICTURE Edit - Graph

    - OLE - Metafile

    - Extend Image - Bitmap Button

    - Function Key - Date

    (2) Items printed with vertical expansion

    - List Box - Edit (multi-line entry)

    See Example 1 following the Method descriptions.

  • 60 PowerCOBOL Objects

    (3) Items printed with vertical and horizontal expansion

    - Table

    See Example 2 following the Method descriptions.

    (4) Items printed in a format different from that displayed onthe screen (Combo Box style)

    - Combo Box - Selection Box

    See Example 3 following the Method descriptions.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-UPMARGIN S9(4) COMP-5 Upper margin OKPOW-BOTTOMMARGIN S9(4) COMP-5 Lower margin OKPOW-LEFTMARGIN S9(4) COMP-5 Left margin OKPOW-RIGHTMARGIN S9(4) COMP-5 Right margin OKPOW-PUNCHMARGIN S9(4) COMP-5 Binding margin OKPOW-PAPERTYPE S9(4) COMP-5 Paper type OKPOW-PAGENOFORMAT S9(4) COMP-5 Page number printin g format

    OKPOW-HEADSTRING X(256) Header character string OKPOW-PAPERDIRECT S9(4) COMP-5 Paper direction OK

    Event

    None.

  • PowerCOBOL Objects 61

    Methods

    OPENPRINTER

    Starts the printing process.

    WRITESHEET

    Prints the items on the sheet with POW-PRNENABLE set to POW-ON.

    CLOSEPRINTER

    Ends print processing. Executing this method starts the actualprinting.

  • 62 PowerCOBOL Objects

    Example 1

    A list box is inserted on a sheet so that up to six lines are displayedas shown below. However, the actual data spans 30 lines. In thiscase, the print result is as shown on the right. If the page endsbefore all lines are printed, the page is automatically fed to printthe remaining lines.

  • PowerCOBOL Objects 63

    Example 2

    A table (8 columns, 50 rows) is inserted on a sheet. The print resultis shown in the following figure. If the page ends before all linesare printed, the page is automatically fed to print the remaininglines. If there are too many columns and they overflow the widthof the page, the excess is printed on the next page.

  • 64 PowerCOBOL Objects

    Usage Notes

    There are times when an item that is expanded during printing (listbox and table) overlaps an unexpanded item, for example, when atable item has a border created by a rectangle item. In this case, ifthe POW-PRNENABLE attribute of the rectangle item is set toPOW-ON, printing may not be as expected. The following figureshows the result obtained when data is printed with the POW-PRNENABLE attribute of the rectangle item set to POW-ON.

  • PowerCOBOL Objects 65

    Example 3

    For a combo box, only the edit field (the hatched areas in thefollowing figure) is printed.

  • 66 PowerCOBOL Objects

    Push Button

    Description

    Push buttons are used to perform specific actions. When a pushbutton is clicked, the related procedure is executed.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string OKPOW-POSITION X(8) Position OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) CO MP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-DEFBUTTON S9(4) COMP-5 Default button OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Event

    CLICK

    This event is reported when the left mouse button is pressed, or thepush button has focus and the SPACE BAR or the ENTER key ispressed.

    The CLICK event is also reported when:

    - the POW-DEFBUTTON attribute is set to POW-ON and

    - an item other than a push button has the focus and

    - the ENTER key is pressed.

  • PowerCOBOL Objects 67

    In this situation, the focus does not move.

    If the item in focus is a multi-line edit item or a table item and theENTER key pressed, the CLICK event is not reported.

    Method

    SETFOCUS

    Sets the focus to the item.

  • 68 PowerCOBOL Objects

    Radio Button

    Description

    Radio buttons are used for selecting options, particularly forgroups of options that are mutually exclusive.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Text string OKPOW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Text color OKPOW-TEXTBKCOLOR X(4) Text back color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-CHECK S9(4) COMP-5 Check type OKPOW-TEXTPOS S9(4) COMP-5 Text display position OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    CLICK

    Occurs when a radio button is changed to the check status byclicking the mouse on the button or when the ENTER key ispressed.

    The event also occurs when POW-CHECK is set to POW-ON in anevent procedure.

  • PowerCOBOL Objects 69

    It does not occur when changing the check status to non checkstatus.

    Method

    SETFOCUS

    Sets the focus to the item.

  • 70 PowerCOBOL Objects

    Rectangle

    Description

    This item used for displaying a rectangle. The rectangles can beshaded or made transparent.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-BORDER S9(4) COMP-5 Border display OKPOW-PRNENABLE S9(4) COMP-5 Print enable OK

    Event

    None.

    Method

    None.

  • PowerCOBOL Objects 71

    Selection Box

    Description

    The selection box is a specific type of combo box used to displayand select fields from files that are either in the comma separatedvalues (CSV) format or in text format.

    For both formats, records are assumed to consist of a number offields. The selection box displays the values for one field at a time.

    Typing a character string in the edit field scrolls the list to the firstitem that begins with the entered string. Pressing the ENTER keyreduces the listed items to only those that start with the enteredstring.

    Record format

    You can specify two types of record formats: CSV and text recordformats.

    The CSV format is created by a spread sheet program or text editor.In CSV format the fields are delimited by a commas (,) and therecords by carriage returns.

    Example 1 shows a CSV format file, and Example 2 shows a textformat file. The examples can be found following the Methoddescriptions.

    Display field

    Only one field is displayed at a time in the selection box list.

    Specify the field you want to display in the Selection Box Item Styledialog box.

  • 72 PowerCOBOL Objects

    This display field can be changed during execution by moving thenew value to POW-CURFIELDNO.

    Example 3 gives examples of using different display field values.

    Attributes

    Attributes Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-TEXTCOLOR X(4) Character color OKPOW-TEXTBKCOLOR X(4) Character background color OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Visible OKPOW-ENABLE S9(4) COMP-5 Enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Bold OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-COUNT S9(4) COMP-5 Number of items IGPOW-CURFIELDNO S9(4) COMP-5 Presentation field No. OKPOW-STRING X(128) Retrieval character string IGPOW-FILENAME X(128) Reference file name OKPOW-RECORDFORM X(128) Read record format OKPOW-SELRECORDSTR X(128) Character string of IG

    OCCURS 1 TO TIMES each selected fieldDEPENDING ON Number of fields

    POW-PRNENABLE S9(4) COMP-5 Print enable OK

    Events

    SELCHANGE

    Reported when the field to be selected is changed in the list box.You can then reference the character string selected in the list box.

    EDIT (*1)

    Reported when the edit field is placed into edit mode.

  • PowerCOBOL Objects 73

    RETURN (*1)

    Reported when the edit field is in edit mode and the followingoccurs:

    1) The ENTER key is pressed.

    2) The edit mode is reset, that is, the focus of the selection box isreset.

    *1 You can select whether this event is reported in the Selection BoxItem Style dialog box.

    Method

    SETFOCUS

    Sets the focus of an item.

  • 74 PowerCOBOL Objects

    Example-1

    In CSV, format fields are delimited by a comma (,). The length ofeach field may be different. Each record ends with a carriagereturn code.

  • PowerCOBOL Objects 75

    Example-2

    The text record format can be created by a text editor. In thisformat, there are no commas between fields (unlike the CSVformat); therefore, the length of each field processed by theselection box item must be the same. When you process a text-format record in a selection box item, you cannot skip a field suchas field 1 to field 3. This is because a record is successivelyprocessed from the first field. In other words, successive fieldsranging from the first field to field n are always processed one at atime.

    To specify the length of each field, select "text" in the file format ofthe Selection Box Item Style dialog box. Then define the length, inbytes, of each field in the Record entry field. For the data shownbelow the Record entry field would look like this:

  • 76 PowerCOBOL Objects

    Example-3

    The example below shows the CSV-format data input to theselection box and the results of specifying display fields 1 to 4 inthe item style dialog box.

    display field = 1 display field = 2 display field = 3 display field = 4

  • PowerCOBOL Objects 77

    Sheet

    Description

    A sheet is used by PowerCOBOL as the framework for a graphicalapplication window. A PowerCOBOL application is comprised ofat least one sheet. Note: The sheet icon does not appear in the ItemBox. To create a new sheet, select New from the File menu.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(256) Title string OKPOW-POSITION X(8) Item position OKPOW-BACKCOLOR X(4) Item background color OKPOW-VISIBLE S9(4) COMP-5 Sheet visible IGPOW-ENABLE S9(4) COMP-5 Sheet enable IGPOW-ICON X(14) Icon resource name OKPOW-CURSOR X(14) Cursor resource name OKPOW-COMMANDLINE X(128) Command line Parameter OK

    Events

    OPENED

    Occurs just before a sheet is displayed. This event is generallyused to initialize items such as list boxes and combo boxes that takedata from files.

    CLOSE

    Occurs when a sheet is closed. Generally this occurs when endingthe processing of a sheet.

  • 78 PowerCOBOL Objects

    CLOSECHILD

    Occurs when closing a child sheet previously opened by theOPENSHEET method. If it is necessary to transfer data from achild sheet, it is done during the processing of this event.

    Methods

    OPENSHEET

    Opens and displays the defined sheet.

    CLOSESHEET

    Closes the currently open sheet.

    DISPLAYMESSAGE

    Displays a text string in a message box.

    GETFILENAME

    Gets the file name and displays the common dialog.

    ALARM

    Sounds an alarm.

    EXECAPL

    Executes an application.

  • PowerCOBOL Objects 79

    GETSCREENSIZE

    Acquires the screen size in pixels.

    SHOWSHEET

    Displays the sheet in a specified state.

  • 80 PowerCOBOL Objects

    Sound

    Description

    By setting the sound file name (a WAVE file with extension .WAV)to the POW-SOUNDNAME attribute, sound can be played byusing the PLAY method.

    Note: A sound card is required. It is not possible to play sound byusing the normal PC internal speaker.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-SOUNDNAME X(128) WAVE file name OK

    Event

    None.

    Method

    PLAY

    Plays a sound file.

  • PowerCOBOL Objects 81

    Table

    Description

    Used when data is in table form. The table item is defined to be anumber of columns and rows. It is referenced though the cellsrepresenting each compartment of the table. The table size isspecified by setting the number of rows and columns up to a limitof 255, with the proviso that the number of cells cannot exceed20000. The captions are included in the cell count, so make surethat:

    ( (Row-count+1) x (Column-count+1) )

  • 82 PowerCOBOL Objects

    To set the data by using table methods, use theSETCELLNUMERIC and SETCELLTEXT methods depending onthe cell type. To read the table data by using table methods, usethe GETCELLNUMERIC and GETCELLTEXT methods. Thesemethods do not move the focus.

    To set or refer to the data by using attribute names, use the POW-NUMERIC or POW-TEXTattribute, depending on the cell type.These attributes are set up as 2 dimensional arrays with row andcolumn as subscripts.

    You can obtain the positions of the row and column of thecurrently focused cell by referring to POW-ROW and POW-COL.POW-ROW and POW-COL can be only referenced. To focus on acertain cell, use the SELECTCELL method.

    Examples:

    1. Cell (1) in the figure is at POW-ROW = 1, POW-COL = 1.

    2. To set 1000 to cell (2) in the figure do one of following:a) CALL SETCELLNUMERIC OF TABLE1 USING 1000 2 4.

    orb) MOVE 1000 TO POW-NUMERIC (2, 4) OF TABLE1.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-TEXT X(56) Text string IGPOW-POSITION X(8) Item position OKPOW-TEXTCOLOR X(4) Item text color OKPOW-TEXTBKCOLOR X(4) Item text back color OKPOW-BACKCOLOR X(4) Item background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-FONTSIZE S9(4) COMP-5 Font size OKPOW-WEIGHT S9(4) COMP-5 Boldface OKPOW-ITALIC S9(4) COMP-5 Italic OKPOW-UNDERLINE S9(4) COMP-5 Underline OKPOW-STRIKE S9(4) COMP-5 Strike OKPOW-NUMERIC S9(14)V9(4) Numeric value IGPOW-ROWS S9(4) COMP-5 Row count OKPOW-COLS S9(4) COMP-5 Column count OK

  • PowerCOBOL Objects 83

    POW-ROW S9(4) COMP-5 Row position IGPOW-COL S9(4) COMP-5 Column position IGPOW-CLICKROW S9(4) COMP-5 Click row position IGPOW-CLICKCOL S9(4) COMP-5 Click column position IGPOW-COLCAPTION S9(4) COMP-5 Column caption OKPOW-ROWCAPTION S9(4) COMP-5 Row caption OKPOW-COLWIDTH S9(4) COMP-5 Column width OK

    OCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-COLENABLE S9(4) COMP-5 Column enable OKOCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-COLTEXTPOS S9(4) COMP-5 Text position of column OKOCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-NUMERIC S9(14)V9(4) Numeric of cell IGOCCURS 0 TO 2000 TIMESDEPENDING ON POW-ROWSOCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-TEXT X(56) Text string of cell IGOCCURS 0 TO 2000 TIMESDEPENDING ON POW-ROWSOCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-TEXTCOLOR X(4) Text color of cell IGOCCURS 0 TO 2000 TIMESDEPENDING ON POW-ROWSOCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-TEXTBKCOLOR X(4) Text back color of cell IGOCCURS 0 TO 2000 TIMESDEPENDING ON POW-ROWSOCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-BACKCOLOR X(4) Back color of cell IGOCCURS 0 TO 2000 TIMESDEPENDING ON POW-ROWSOCCURS 0 TO 255 TIMESDEPENDING ON POW-COLS

    POW-PRNENABLE S9(4) COMP-5 Print enableOK

  • 84 PowerCOBOL Objects

    Events

    EDIT

    The EDIT event occurs in the following situations:

    When the user starts to enter characters to a cell

    When the cell has focus and the user presses ENTER

    When there is a double click on the cell.

    If the "Focus acquired " checkbox is checked in the Column Styledialog box, the EDIT event is also reported when the cell getsfocus.

  • PowerCOBOL Objects 85

    RETURN

    Reported:

    When the focus is reset to select another cell by pressing theENTER key or when the cursor is moved during cell textediting.

    When the focus is moved to another item on the same sheetduring text editing.

    When the size of the entered character string reaches thecharacter string length as defined by the PICTURE definition.

    You can configure which of these conditions trigger the event byclicking on the Event button in the Table Item Style dialog box.

    CLICK

    Reported when clicking the left mouse button in an unedited tableitem cell. Referencing POW-CLICKROW and POW-CLICKCOLidentifies the position of the cell clicked.

    DBLCLICK

    Occurs when double clicking a specific cell of table item using leftmouse button.

    Methods

    SELECTCELL

    Used to move the focus.

  • 86 PowerCOBOL Objects

    SETCELLNUMERIC

    Sets the value of a cell specified as a numeric field.

    SETCELLTEXT

    Sets the value of a cell specified as alphabetic, alphanumeric oralphabetic edited.

    GETCELLNUMERIC

    Obtains the value contained in a cell defined as a numeric item.

    GETCELLTEXT

    Obtains the value contained in a cell defined as alphabetic,alphanumeric or alphabetic edit.

    SETFOCUS

    Sets the focus to the item.

  • PowerCOBOL Objects 87

    Timer

    Description

    Placing the timer on a sheet enables the timer process. The timer isnot displayed on the sheet while the application is running.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-ACTIVATE S9(4) COMP-5 Start/stop OKPOW-INTERVAL S9(4) COMP-5 Event occur interval OK

    Event

    TIMER

    Uses the interval time set in the POW-INTERVALattribute whenthe POW-ACTIVATEattribute is POW-ON.

    Method

    None.

  • 88 PowerCOBOL Objects

    Vertical Scroll Bar

    Description

    The vertical scroll bar can be used to select a specific value within acontinuous value range.

    Attributes

    Attribute Name Definition Function Valid/Ignored

    POW-POSITION X(8) Position OKPOW-BACKCOLOR X(4) Background color OKPOW-VISIBLE S9(4) COMP-5 Item visible OKPOW-ENABLE S9(4) COMP-5 Item enable OKPOW-MAX S9(4) COMP-5 Maximum value OKPOW-MIN S9(4) COMP-5 Minimum value OKPOW-LARGESTEP S9(4) COMP-5 Large step OKPOW-SMALLSTEP S9(4) COMP-5 Small step OKPOW-SCRPOSITION S9(4) COMP-5 Current value OK

    Events

    CHANGE

    Occurs when the position is changed.

    ENDSCROLL

    Occurs when scroll is ended or the mouse button is released.

  • PowerCOBOL Objects 89

    Method

    SETFOCUS

    Sets the focus to the item.

  • 90 PowerCOBOL Objects

    A Note of Caution When Using Excel

    You can only link one DDE item per Excel sheet. When multipleDDE items are linked to one sheet, the data is returned only to onelink. However, you can link multiple sheets one by one.

  • PowerCOBOL Objects 91

    Advanced usage of DDE items

    Description

    Using the DDE item, it is possible to perform more functions with aDDE client such