<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>ClipboardFusion RSS: Macro with WinForm</title>
<atom:link href="https://www.clipboardfusion.com/Discussions/RSS/?TopicID=cf439efc-83e1-4071-a542-b5a6f748346f" rel="self" type="application/rss+xml" />
<link>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=cf439efc-83e1-4071-a542-b5a6f748346f</link>
<description>ClipboardFusion RSS: Macro with WinForm</description>
<lastBuildDate>Mon, 27 Apr 2026 10:11:56 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=cf439efc-83e1-4071-a542-b5a6f748346f</generator>
<item>
<title>RE: Macro with WinForm</title>
<link>https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#7</link>
<pubDate>Tue, 11 Jun 2013 20:41:11 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#7</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Sorry about that! It looks like the tool tip and documentation for the GetHistoryImage function was out of date, and will be updated as soon as possible. The syntax for the new function is:
Code
Copy
Select All
Image GetHistoryImage(int index)
If the Clipboard History Item is not an image, t...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Sorry about that! It looks like the tool tip and documentation for the GetHistoryImage function was out of date, and will be updated as soon as possible. The syntax for the new function is:<br/>
<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019dce6c98627141a2375dd7d02e1c73" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019dce6c98627141a2375dd7d02e1c73Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019dce6c98627141a2375dd7d02e1c73Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">Image GetHistoryImage(int index)</pre><textarea id="code019dce6c98627141a2375dd7d02e1c73" name="code019dce6c98627141a2375dd7d02e1c73" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
If the Clipboard History Item is not an image, the function will return null, so any null image is considered to be a text item. Here is an example of a function to check if an item is an image or not:<br/>
 <br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019dce6c986575678225edc2ce8a5cd1" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019dce6c986575678225edc2ce8a5cd1Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019dce6c986575678225edc2ce8a5cd1Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">private bool IsClipboardItemAnImage(int index)
 {
  return (MacroAPI.GetHistoryImage(index) != null);
 }</pre><textarea id="code019dce6c986575678225edc2ce8a5cd1" name="code019dce6c986575678225edc2ce8a5cd1" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Macro with WinForm</title>
<link>https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#6</link>
<pubDate>Fri, 07 Jun 2013 20:30:40 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#6</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Hi Keith,
Thanks for notifying about the new API's. However the new GetHistoryImage function doesn't work as the docs says. When running the example I get the error:
Code
Copy
Select All
"No overload for method 'GetHistoryImage' takes '2' arguments"
CF is so obfuscated that I can't see what...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hi Keith,<br/>
<br/>
Thanks for notifying about the new API's. However the new <i>GetHistoryImage</i> function doesn't work as the docs says. When running the example I get the error:<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019dce6c986c7486bfb126b81b208d0b" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019dce6c986c7486bfb126b81b208d0bJs'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019dce6c986c7486bfb126b81b208d0bJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">"No overload for method 'GetHistoryImage' takes '2' arguments"</pre><textarea id="code019dce6c986c7486bfb126b81b208d0b" name="code019dce6c986c7486bfb126b81b208d0b" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
CF is so obfuscated that I can't see what arguments it do need. I'm hoping small bug...<br/>
<br/>
Anyways, about using this, we still don't know if an item at a specific index is just text or an image. To get around this I was thinking about using the following code, but I don't know if this is what was intended:<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019dce6c986e765eb2c0c04db9d5fc04" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019dce6c986e765eb2c0c04db9d5fc04Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019dce6c986e765eb2c0c04db9d5fc04Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">ImageList imageList = new ImageList();
List&lt;String&gt; textList = new List&lt;String&gt;();
int i = MacroAPI.GetHistoryItemCount();
String textItem;
while(i&gt;=0){
    // get the text (image may have a name);
    if(MacroAPI.GetHistoryText(i, out textItem)){
        textList.Add(textItem);
    }
    // also check if it is an image;
    Image image;
    if(MacroAPI.GetHistoryImage(i, out image) && image!=null){
        imageList.Images.Add(image);
    }
    i--;
}</pre><textarea id="code019dce6c986e765eb2c0c04db9d5fc04" name="code019dce6c986e765eb2c0c04db9d5fc04" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>Also, the docs doesn't say what <i>GetHistoryImage</i> returns; <i>boolean</i> or just <i>void</i>.<br/>
<br/>
Edit: running the latest beta of course <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Macro with WinForm</title>
<link>https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#5</link>
<pubDate>Thu, 06 Jun 2013 20:24:52 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#5</guid>
<category>ClipboardFusion</category>
<description><![CDATA[We've just released ClipboardFusion 3.0 Beta 5 (http://www.clipboardfusion.com/Download/Beta), and we've added the following new MacroAPI Functions:
MacroAPI.GetHistoryItemCount
MacroAPI.GetHistoryImage
MacroAPI.ClearHistory
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
We've just released ClipboardFusion 3.0 Beta 5 (<a href="http://www.clipboardfusion.com/Download/Beta" target="_blank" rel="nofollow"><b>http://www.clipboardfusion.com/Download/Beta</b></a>), and we've added the following new MacroAPI Functions:<br/>
<br/>
MacroAPI.GetHistoryItemCount<br/>
MacroAPI.GetHistoryImage<br/>
MacroAPI.ClearHistory<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Macro with WinForm</title>
<link>https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#4</link>
<pubDate>Fri, 31 May 2013 19:54:41 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#4</guid>
<category>ClipboardFusion</category>
<description><![CDATA[No problem! We'll be adding some of your requested functions in the next beta]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
No problem! We'll be adding some of your requested functions in the next beta <img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Macro with WinForm</title>
<link>https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#3</link>
<pubDate>Thu, 30 May 2013 18:25:36 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#3</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Hey Keith. Thnx for replying.
I indeed was under the impression that clear meant the whole CF history records.
Keep up the great work.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hey Keith. Thnx for replying.<br/>
I indeed was under the impression that clear meant the whole CF history records. <br/>
Keep up the great work.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Macro with WinForm</title>
<link>https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#2</link>
<pubDate>Wed, 29 May 2013 19:37:07 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f#2</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Very cool! Regarding your questions:
The ClearClipboard function only clears the Windows clipboard contents, not the ClipboardFusion History. Are you trying to clear the ClipboardFusion History? If so, I'll add this to our feature request list.
There's no way currently to detect from the macro ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Very cool! Regarding your questions:<br/>
<ul class="ListBullet">
<li>The ClearClipboard function only clears the Windows clipboard contents, not the ClipboardFusion History. Are you trying to clear the ClipboardFusion History? If so, I'll add this to our feature request list.</li>
<li>There's no way currently to detect from the macro whether the History item is an image, but I'll add that to our feature request list.</li>
<li>ClipboardFusion runs in .NET 2.0 for now.</li></ul>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>Macro with WinForm</title>
<link>https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f</link>
<pubDate>Tue, 21 May 2013 22:28:55 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/macro-with-winform/?ID=cf439efc-83e1-4071-a542-b5a6f748346f</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Just for fun, I wanted to test if it's possible to open an WinForm from within a marco.
The result is that it does, without any restrictions (maybe a favicon, but even that can be worked around).
I don't know where the test will go to, so I thought I share the code for others to use.
Code can ...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Just for fun, I wanted to test if it's possible to open an WinForm from within a marco.<br/>
<br/>
The result is that <b>it does</b>, without any restrictions (maybe a favicon, but even that can be worked around).<br/>
<br/>
I don't know where the test will go to, so I thought I share the code for others to use.<br/>
Code can be found here: <a href="http://pastebin.com/vDAKzZqp" target="_blank" rel="nofollow"><b>http://pastebin.com/vDAKzZqp</b></a><br/>
<br/>
I do have some issues/questions:<br/>
<ul class="ListBullet">
<li>`MacroAPI.ClearClipboard` doesn't seems to do anything.</li>
<li>How to detect and show if it's any image? Images are only just added to first beta, but I love to implement a macro function in the test.</li>
<li>Which .NET version are the macros running at? Not 4.0 as "Default parameter specifiers are not permitted" I noticed.</li></ul>
<br/>
I'm running the latest beta (v3.0.0 Beta 3 ~ May 15, 2013).
</div>
]]></content:encoded>
</item>
</channel>
</rss>