I have a dialog box that has an icon for "paste". I want to enable it if
there is
text on the clipboard. How do I check for other parts of my dialog (e.g.
textboxes)
that may allow a ctrl-c. If my form intercepts KeyPress or
ProcessDialogKey, it
seems that the data has not yet been put on the clipboard (i.e.
children/textbox has
not handled it yet).

Amil

Re: How to handle Control-C (copy) AFTER form has done it by Roy

Roy
Thu Nov 27 11:06:04 CST 2003

On Thu, 27 Nov 2003 00:36:54 -0700, Amil wrote:

> I have a dialog box that has an icon for "paste". I want to enable it if
> there is
> text on the clipboard. How do I check for other parts of my dialog (e.g.
> textboxes)
> that may allow a ctrl-c. If my form intercepts KeyPress or
> ProcessDialogKey, it
> seems that the data has not yet been put on the clipboard (i.e.
> children/textbox has
> not handled it yet).
>
> Amil

call base.ProcessDialogKey() in your overriden method BEFORE you do
anything else. Perhaps that will fix it.
--
Roy Osherove
weblog: http://www.iserializable.com