Title

Message

Confirm

Want to earn a free DisplayFusion Pro license? We're looking for DisplayFusion translators!
<< DiscussionsReply

why 'System.Drawing.Rectangle.y' is inaccessible due to its protection level

Avatar from Gravatar.com
Charles7
26 discussion posts
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
Rectangle rabid = BFS.Monitor.GetMonitorBoundsByWindow(windowHandle);
//Rectangle rabid = BFS.Window.GetBounds(windowHandle);
int cbx = rabid.x;
int cby = rabid.y;
}
}

I just want the current monitors top left coordinate (adjusted for taskbar etc)
GetBounds works
GetMonitorBoundsByWindow throws error

Compile Failed.
Line 10: 'System.Drawing.Rectangle.x' is inaccessible due to its protection level
Line 11: 'System.Drawing.Rectangle.y' is inaccessible due to its protection level
12 days ago  • #1
Avatar from Gravatar.com
Charles7
26 discussion posts
.x and .y need to be .X and .Y

Fixed.
12 days ago  • #2
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Glad to hear you were able to get it sorted out. Thanks!
12 days ago  • #3
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply