Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
rosalinda Absent Member.
Absent Member.
1516 views

Cobol support animation?

Jump to solution

 Hello, Im new to cobol. I have some question, does Cobol support animation such as gauge meter? Is there any way to implement gauge meter into cobol other than using ActiveX Control?

 

Tags (3)
0 Likes
2 Solutions

Accepted Solutions
ruudh
New Member.

RE: Cobol support animation?

Jump to solution

Hello Rosalinda,

I'm not sure what you mean.

One cannot create graphics in Cobol, but you can display graphics, static as well as animated.

In the example gauge below, you can point to one of the images in the strip or let it run from the first to the last.

Hopefully this helps,

Regards, Ruud

View solution in original post

0 Likes
RobertRedekop Trusted Contributor.
Trusted Contributor.

RE: Cobol support animation?

Jump to solution
You are correct. Extend cobol does not have any graphic primitives. It has various controls that are surpisingly flexible, and they can be used to solve various issues that I will try to list out, but if you want to actually draw your own images then yes, you will need a graphics library you can interface to that does the work for you. That can be an activeX library or dll or java library - there are sections in the manuals on inter-connectivity.

Control options:
- BITMAP can show a picture or an animated GIF
- As ruudh showed, you could use a bitmap strip and change which picture you display to simulate a moving dial. Just have your program compute percentage, and when you get past X (10% gaps in ruudh's strip) update which bitmap you show.
- Browser can show a picture or movie - anything that can be shown on a webpage, but all you can do is pass it a URL. You could build an HTML file and point the browser at that, then generate a new one and update the control to point at the new URL.
- W$PROGRESSDIALOG routine can be used to display a progress bar in a separate window(really useful for C$COPY in thin client).
- FRAME - shows a box which can be filled/partially-filled to simulate a progress bar in your own window. Just keep updating until you get to 100%.
- BAR - draws lines, but only horiizontal or vertical. Nothing angled. No circles.

That's it, anything else usually requires a graphics library. Good luck!

View solution in original post

7 Replies
ruudh
New Member.

RE: Cobol support animation?

Jump to solution
Hello Rosalinda,
yes, you can with Cobol. You can use the W$BITMAP function to display a bitmap or an animated bitmap.
DougP Outstanding Contributor.
Outstanding Contributor.

RE: Cobol support animation?

Jump to solution

The Tour.cbl sample program demonstrates the use of animated bitmaps.

rosalinda Absent Member.
Absent Member.

RE: Cobol support animation?

Jump to solution
Hello ruudh.. Thank you for the answer.. But I have a question.. Can we create animation using COBOL language?
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Cobol support animation?

Jump to solution
Depends on what you want to animate. You mentioned a gauge. Using the frame control, there are 2 fill colors, so you can fill the frame as you wish (i.e. a certain % full).
0 Likes
ruudh
New Member.

RE: Cobol support animation?

Jump to solution

Hello Rosalinda,

I'm not sure what you mean.

One cannot create graphics in Cobol, but you can display graphics, static as well as animated.

In the example gauge below, you can point to one of the images in the strip or let it run from the first to the last.

Hopefully this helps,

Regards, Ruud

View solution in original post

0 Likes
rosalinda Absent Member.
Absent Member.

RE: Cobol support animation?

Jump to solution
So Cobol cannot create graphics like drawing shapes.. do you mean that?

Does that mean Cobol can make an image rotate (such as needle rotation)? How to make it? What kind of software or extension to do that?
0 Likes
RobertRedekop Trusted Contributor.
Trusted Contributor.

RE: Cobol support animation?

Jump to solution
You are correct. Extend cobol does not have any graphic primitives. It has various controls that are surpisingly flexible, and they can be used to solve various issues that I will try to list out, but if you want to actually draw your own images then yes, you will need a graphics library you can interface to that does the work for you. That can be an activeX library or dll or java library - there are sections in the manuals on inter-connectivity.

Control options:
- BITMAP can show a picture or an animated GIF
- As ruudh showed, you could use a bitmap strip and change which picture you display to simulate a moving dial. Just have your program compute percentage, and when you get past X (10% gaps in ruudh's strip) update which bitmap you show.
- Browser can show a picture or movie - anything that can be shown on a webpage, but all you can do is pass it a URL. You could build an HTML file and point the browser at that, then generate a new one and update the control to point at the new URL.
- W$PROGRESSDIALOG routine can be used to display a progress bar in a separate window(really useful for C$COPY in thin client).
- FRAME - shows a box which can be filled/partially-filled to simulate a progress bar in your own window. Just keep updating until you get to 100%.
- BAR - draws lines, but only horiizontal or vertical. Nothing angled. No circles.

That's it, anything else usually requires a graphics library. Good luck!

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.