It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Clipboard error

Moderator: dafunkymunky

Clipboard error

Postby jakeeady on Wed Oct 27, 2010 3:01 pm

I'm getting this error when adding a string to the clipboard. I understand it's because two programs are accessing the clipboard but how do I work around it?
I heard that VB has its own clipboard? Would that be a solution? Also, is there a difference between my.computer.clipboard and just clipboard?

Thanks!

Code: Select all
See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.



************** Exception Text **************

System.Runtime.InteropServices.ExternalException: Requested Clipboard operation did not succeed.

   at System.Windows.Forms.Clipboard.ThrowIfFailed(Int32 hr)

   at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy, Int32 retryTimes, Int32 retryDelay)

   at System.Windows.Forms.Clipboard.SetText(String text, TextDataFormat format)

   at System.Windows.Forms.Clipboard.SetText(String text)

   at Microsoft.VisualBasic.MyServices.ClipboardProxy.SetText(String text)

   at TRHGofer.frmGofer.btnClipboard_Click(Object sender, EventArgs e)

   at System.Windows.Forms.Control.OnClick(EventArgs e)

   at System.Windows.Forms.Button.OnClick(EventArgs e)

   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ButtonBase.WndProc(Message& m)

   at System.Windows.Forms.Button.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)





************** Loaded Assemblies **************

mscorlib

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.3615 (GDR.050727-3600)

    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

----------------------------------------

TRHGofer

    Assembly Version: 1.0.0.1

    Win32 Version: 1.0.0.1

    CodeBase: file:///C:/Documents%20and%20Settings/e47438f/My%20Documents/Gofer.exe

----------------------------------------

Microsoft.VisualBasic

    Assembly Version: 8.0.0.0

    Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)

    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

----------------------------------------

System

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.3614 (GDR.050727-3600)

    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Windows.Forms

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)

    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System.Drawing

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)

    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System.Runtime.Remoting

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)

    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

----------------------------------------

System.Xml

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)

    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------



************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.



For example:



<configuration>

    <system.windows.forms jitDebugging="true" />

</configuration>



When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

jakeeady
 
Posts: 2
Joined: Tue Sep 28, 2010 3:53 pm

Who is online

Users browsing this forum: No registered users and 4 guests