We have an application that starts a .net Ribbon menue, and I am trying to find the upper left corner of the window. The reason for wanting that, is that we have a dynamic filter window that is postioned very wrong when using more than one screen. On my computer, I have three screens, so I would like to position the filter closer to the main window.
I have tried walking both session:first-procedure and session:first-form, but I am not sure where to find the positon for the window.
What should I look for? How can I find the first window handle so that I can use the window object ?
Hi Geir,
I seem to have missed the introduction of FIRST-FORM and it seems handy. However, I see this note in the remarks:
"If you instantiate a Progress.Windows.IForm in a non-GUI ABL session, the object does not appear in the list of OpenEdge form objects, but only in the list of valid class-based objects."
I am not sure how to interpret this, but I would try using FIRST-OBJECT to find your ribbon form.
Hi Geir,
I seem to have missed the introduction of FIRST-FORM and it seems handy. However, I see this note in the remarks:
"If you instantiate a Progress.Windows.IForm in a non-GUI ABL session, the object does not appear in the list of OpenEdge form objects, but only in the list of valid class-based objects."
I am not sure how to interpret this, but I would try using FIRST-OBJECT to find your ribbon form.
Thanks :-) Brian, my problem was to find THIS-OBJECT, but Your was right, location:X and Location:Y gave me correct position :-)
Pete, thanks, I was looking for a way of finding the TYPE and suddenly you gave it to me.
Peter, thanks, that was why I never got any Luck With the FIRST-FORM... :-)
This gave me the correct result:
def var oObject as class Progress.Lang.Object no-undo.
oObject = session:first-object.
do while valid-object(oObject):
if type-of(oObject,Progress.Windows.Form) then
MESSAGE oObject:ToString()
VIEW-AS ALERT-BOX.
oObject = oObject:Next-Sibling.
end.
whitch was session:first-object.