{"id":1578,"date":"2009-07-02T13:29:17","date_gmt":"2009-07-02T12:29:17","guid":{"rendered":"http:\/\/www.itwriting.com\/blog\/1578-clipboard-clear-oops.html"},"modified":"2009-07-02T13:29:17","modified_gmt":"2009-07-02T12:29:17","slug":"clipboard-clear-oops","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/1578-clipboard-clear-oops.html","title":{"rendered":"Clipboard.Clear \u2026 oops"},"content":{"rendered":"<p>Bob Warfield is <a href=\"http:\/\/smoothspan.wordpress.com\/2009\/07\/01\/microsoft-bad-user-experience-is-cultural\/\">upset because he lost some work<\/a>. He copied some text in Live Writer, deleted it, then opened Word and tried to paste. No go .. clipboard empty.<\/p>\n<p>Frustrating, but is he right to call his post <strong>Microsoft: Bad User Experience Is Cultural<\/strong>, on the grounds that Word is designed to clear the clipboard every time it opens?<\/p>\n<p>Here\u2019s a bit more information. First, Word does not do that here. Second, if it weren\u2019t that I do equally silly things I\u2019d suggest that it is always risky to entrust the clipboard with your work without a backup.<\/p>\n<p>That said, I can understand why Word might appear to clear the clipboard on start-up. It could be a bug, or it could be an add-in of some kind. The thing is, it is really easy to clear the clipboard in code. Just call <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms649037(VS.85).aspx\">EmptyClipboard<\/a> and you\u2019re done. There are ways to do it in VBA too, via a DataObject, or in .NET via Clipboard.Clear.<\/p>\n<p>As Warfield\u2019s case shows, clearing the clipboard in code can be deeply user-hostile. Should Windows prevent it? Difficult, because if your application or add-in implements clipboard functionality, it is the correct thing to do when the user selects Cut, Copy or Paste.<\/p>\n<p>Lessons? A warning, I guess, not to use the clipboard for any purpose other than a user-initiated clipboard action \u2013 though I guess it can be tempting if you are hacking some sort of inter-process data exchange.<\/p>\n<p>Second, when Windows lets you down it is not necessarily Microsoft culture to blame. There is an argument though &#8230; applications that don\u2019t conform to Windows guidelines are a big problem and without them things like User Account Control might not need to exist; and that is Microsoft\u2019s fault in a way, because of the history of Windows, its changing guidelines, and the inability of even Microsoft to stick to them in the past. Maybe Microsoft is partly to blame for the wild culture of third-party Windows apps.<\/p>\n<p>This is a blog entry rather than a comment because Warfield\u2019s blog needs registration to comment, and I am allergic.<\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:37f7db05-7042-4d85-be54-e26bd0fff2b9\" class=\"wlWriterEditableSmartContent\">Technorati Tags: <a href=\"http:\/\/technorati.com\/tags\/clipboard\" rel=\"tag\">clipboard<\/a>,<a href=\"http:\/\/technorati.com\/tags\/bob+warfield\" rel=\"tag\">bob warfield<\/a>,<a href=\"http:\/\/technorati.com\/tags\/microsoft\" rel=\"tag\">microsoft<\/a>,<a href=\"http:\/\/technorati.com\/tags\/word\" rel=\"tag\">word<\/a>,<a href=\"http:\/\/technorati.com\/tags\/windows\" rel=\"tag\">windows<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bob Warfield is upset because he lost some work. He copied some text in Live Writer, deleted it, then opened Word and tried to paste. No go .. clipboard empty. Frustrating, but is he right to call his post Microsoft: Bad User Experience Is Cultural, on the grounds that Word is designed to clear the &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/1578-clipboard-clear-oops.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Clipboard.Clear \u2026 oops<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,80,97],"tags":[],"class_list":["post-1578","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-software-development","category-windows"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/1578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=1578"}],"version-history":[{"count":0,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/1578\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=1578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=1578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=1578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}