Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Method '~' of object '~' failed" on starting VB6 IDE

Tags:

vb6

I have noticed that about every third time or so I start up the VB6 IDE, a message box appears with the following error message:-

Method '~' of object '~' failed

enter image description here

This doesn't happen for any particular project or with any other thing in common that I have noticed. It doesn't appear to cause any problems after dismissing the message. My question is: ought I to worry about this, and if so, what should I do about it.

I have noted these other questions about the same error message here, here and here, but I get the message on opening up the project.

like image 636
Brian Hooper Avatar asked Dec 20 '11 10:12

Brian Hooper


1 Answers

This is usually caused by locked clipboard on local machine. VB6 IDE add-ins use clipboard to copy/paste icons to toolbar buttons because the add-in API does not expose any other way of putting an image there.

Usually Remote Desktop client (mstsc.exe) is the culprit of the locked clipboard. The way Microsoft implemented transfer to remote clipboard is by probing local clipboard for available formats which locks it for a while. Clipboard is awfully designed global resource that can be accessed by a single process at a time and OpenClipboard API fails in flames for other processes if the resource is not currently available.

like image 145
wqw Avatar answered Sep 27 '22 18:09

wqw