Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SystemParametersInfo to Ccharp

0 views
Skip to first unread message

GTi

unread,
Apr 29, 2005, 7:39:26 AM4/29/05
to
I need the csharp (C#) function for this API function:

SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, 0);

Or must I pInvoke this (also)?

My biggest problem with C# is to find the C# function for API functions?
Is there any help for this available anywhere?


john doe

unread,
Apr 29, 2005, 7:05:49 AM4/29/05
to
the SystemInformation class contains some of the details, and from the
looks of things what you're after (SPI_GETWO­RKAREA). You'll need to
use interop for the other options that the SystemInformation class
doesn't contain.

http://www.pinvoke.net/default.aspx/user32.SystemParametersInfo is the
interop definition.

Tom Porterfield

unread,
Apr 29, 2005, 7:10:06 AM4/29/05
to

I believe System.Windows.Forms.Screen.WorkingArea will get you what you
want. See
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsScreenClassGetWorkingAreaTopic3.asp
for more info.

There are also several overloads of
System.Windows.Forms.Screen.GetWorkingArea to return the working area based
on the object that is passed in. See
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformsscreenclassgetworkingareatopic.asp
for additional info on that.
--
Tom Porterfield

0 new messages