Consultor Eletrônico



Kbase P157015: Cannot work with the clipboard from an MDI Form
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/29/2010
Status: Unverified

SYMPTOM(s):

Unable to work with the clipboard from an MDI Form

Unable to open the clipboard. (4481) is raised when trying to work with CLIPBOARD system handle from an MDI child form

Unable to open the clipboard. (4481)

FACT(s) (Environment):

No error is raised when the same form is not launched as an MDI form.
OpenEdge 10.2A
Windows

CAUSE:

Bug# OE00193886

CAUSE:

The error occurs while associating a form's window handle with the clipboard. The window handle is selected by getting the handle of the last window to be added to the window chain. If this is a form, it causes the error.

FIX:

None at this time. As a workaround, create and display an ABL window before putting data on the clipboard and delete the window afterward, using code similar to the following:/* WORKAROUND - Create and display a temporary window. This window
** will be the one we select to associate with the clipboard instead
** of the form's window.
*/
DEF VAR stwin AS HANDLE.
CREATE WINDOW stwin ASSIGN
MESSAGE-AREA = NO
STATUS-AREA = NO
WIDTH = 60
HEIGHT = 10
TITLE = "Updating clipboard"
VISIBLE = YES.

openOutput().
/* Write some data to the clipboard */
CLIPBOARD:VALUE = ?.
CLIPBOARD:MULTIPLE = FALSE.
CLIPBOARD:VALUE = "xyz".
finalise().

RETURN.
FINALLY:
closeOutput().
/* WORKAROUND - Destroy the temporary window */
DELETE WIDGET stwin.
END FINALLY.