<?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>DisplayFusion RSS: Errors when using Rectangle function</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=01966a1b-d2b4-714c-ac96-0b0d307a8289" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=01966a1b-d2b4-714c-ac96-0b0d307a8289</link>
<description>DisplayFusion RSS: Errors when using Rectangle function</description>
<lastBuildDate>Sat, 23 May 2026 01:27:32 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=01966a1b-d2b4-714c-ac96-0b0d307a8289</generator>
<item>
<title>RE: Errors when using Rectangle function</title>
<link>https://www.displayfusion.com/Discussions/View/errors-when-using-rectangle-function/?ID=01966a1b-d2b4-714c-ac96-0b0d307a8289#2</link>
<pubDate>Thu, 24 Apr 2025 23:36:27 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/errors-when-using-rectangle-function/?ID=01966a1b-d2b4-714c-ac96-0b0d307a8289#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[Solved, 5mins after this post, I saw a post mentioning to instal dotnet 8.0.15 and reboot.
On the plus side it now works, downside is I lost 8-9 hours of trying to solve this and a good amount of brain cells]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Solved, 5mins after this post, I saw a post mentioning to instal dotnet 8.0.15 and reboot.<br/>
On the plus side it now works, downside is I lost 8-9 hours of trying to solve this and a good amount of brain cells
</div>
]]></content:encoded>
</item>
<item>
<title>Errors when using Rectangle function</title>
<link>https://www.displayfusion.com/Discussions/View/errors-when-using-rectangle-function/?ID=01966a1b-d2b4-714c-ac96-0b0d307a8289</link>
<pubDate>Thu, 24 Apr 2025 23:22:11 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/errors-when-using-rectangle-function/?ID=01966a1b-d2b4-714c-ac96-0b0d307a8289</guid>
<category>DisplayFusion</category>
<description><![CDATA[Hello all, I am trying to make a script that when ran, displays the focused windows dimensions. I am a very basic programmer and most of my code involves copying others and making adjustments but I see that there is a function that would seem to do all of this - Rectangle[] bounds = BFS.Monitor.G...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Hello all, I am trying to make a script that when ran, displays the focused windows dimensions. I am a very basic programmer and most of my code involves copying others and making adjustments but I see that there is a function that would seem to do all of this - Rectangle[] bounds = BFS.Monitor.GetMonitorBounds(); and then display the 4 values with another line of code. All seems good however, that function brings up an error. <br/>
<br/>
Line 0, Char 0, Assembly 'DisplayFusionScripting' with identity 'DisplayFusionScripting, Version=11.0.0.4, Culture=neutral, PublicKeyToken=null' uses 'System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxx' which has a higher version than referenced assembly 'System.Drawing.Primitives' with identity 'System.Drawing.Primitives, Version=4.2.1.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxx'<br/>
<br/>
I replaced the values of the publickeytokens with x's because I don't know if that information is sensitive or not. But I have attempted to update/ install .net and in cmd, --list-sdks =<br/>
5.0.408<br/>
8.0.300<br/>
9.0.203<br/>
<br/>
I have tried to figure this out myself but came to the conclusion that my knowledge in this department isn't enough for me or chatgpt. I've reinstalled display fusion & I have the pro version if that matters. I have manually added system.drawing.primitives & system.drawing dll to the references for each sdk version<br/>
<br/>
Any help on this would be appreciated! Code below is what I want/ need? to accomplish my original goal, can add all the displaying of bounds later once I first get this error fixed.<br/>
<br/>
Code:<br/>
<br/>
using System;<br/>
using System.Drawing;<br/>
<br/>
public static class DisplayFusionFunction<br/>
{<br/>
    public static void Run(IntPtr windowHandle)<br/>
    {<br/>
        Rectangle[] bounds = BFS.Monitor.GetMonitorBounds();<br/>
    }<br/>
}
</div>
]]></content:encoded>
</item>
</channel>
</rss>