Highlighted
Absent Member.
Absent Member.
824 views

[archive] Control handles

[Migrated content. Thread originally posted on 23 January 2004]

Scenario:
An activex control is being displayed by an acucobol program that I don't have source code. I need to INQUIRE and MODIFY this active control, but don't have it's handle.

Question 1:
Anyone know how I can use the MODIFY verb with CONTROL AT to execute a method of an active-x control. I can't seem to get the syntax right.

Question 2:
Is there some way for me to get the acucobol handle of a control without an event occuring?
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Control handles

Originally posted by DanM

Question 1:
Anyone know how I can use the MODIFY verb with CONTROL AT to execute a method of an active-x control. I can't seem to get the syntax right.


I don't know what syntax you have tried, but the proper would be for instance:

MODIFY  CONTROL AT LINE 13 COL 63 VISIBLE = 0.





Is there some way for me to get the acucobol handle of a control without an event occuring?


I am honestly not sure about this one.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Control handles

Gisle,
Thanks, but my question was to execute a specific member method to the active-x control. Like,

MODIFY CONTROL AT 1101 @REDRAW().

This does not work. I don't think the runtime knows what type of control is being used and thus cannot reference it's member methods this way. Using the numeric reference for the method does not work either. Also, there appears to be no keyword for METHOD like there is for PROPERTY when using the CONTROL AT phrase, which might make this work.

In terms of getting a handle for a control, wouldn't it make sense to simply treat a handle like a read-only property, so it can be retrieved like this:

INQUIRE CONTROL AT 1101 HANDLE IN MY-CONTROL-HANDLE.

Seems simple enough, but this does not appear to be possible right now. Yes, 6.1 allows retrieve of handle if you know the control ID, but in this case, the control has no ID. Then what?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Control handles

Sorry, you cannot use this for component specific properties or methods. As you yourself point out, the runtime must know what it deals with at compilation time for external objects.

This would also be the problem for your INQUIRE suggestion, we cannot inquire something we do not know what is.
0 Likes
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.