我有一个问题,我在网上只看到两三篇关于它的帖子:当我在C#应用程序(Clipboard.SetText或Clipboard.Clear)中使用剪贴板时,Chrome已经在随机使用它了,所以我的剪贴板请求失败了。
System.Runtime.InteropServices.ExternalException: Requested Clipboard operation did not succeed.
at System.Windows.Forms.Clipboard.ThrowIfFailed(Int32 hr)
at System.Windows.Forms.Clipbo
当我试图在datagridview控件上使用ctrl +C和ctrl +V时,我得到了一个错误。这在我的另一台机器上是不可复制的。
进一步分析了这个问题,我发现只有在Google运行时才会出现这个问题。如果我关闭Google,它就会正常工作。。
这是应用程序引发的异常,请求的剪贴板操作没有成功。
--STACK TRACE--
at System.Windows.Forms.Clipboard.ThrowIfFailed(Int32 hr)
at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean c
我开发了一个捕捉所有剪贴板文本的应用程序:
protected override void WndProc(ref Message m)
{
try
{
switch (m.Msg)
{
case WM_DRAWCLIPBOARD:
{
if (Clipboard.GetText() != string.Empty)
//I analyze the data then
if (Clipb
我正在构建一个Windows应用程序,它允许用户远程设置文本,即使应用程序在锁定屏幕下运行。
当应用程序处于锁定屏幕时调用ClipBoard.SetText("some data")时,它抛出以下异常:
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.Clipboard_SetText(String text)
at System.Windows.Clipboard.SetText(String text)
...
对于这个问题有什么建议或解决办法吗?