[Gtk-sharp-list] System.Windows.Forms.SystemInformation equivalent

Christopher David Howie me at chrishowie.com
Tue Sep 7 12:38:20 EDT 2010

On 09/07/2010 12:23 PM, Natalia Portillo wrote:
> The idea is to have a class toolkit independent. Asking Gdk.* is like
> referencing System.Windows.Forms (it is always available in Mono even
> if you don't use it to draw the windows) and taking the
> SystemInformation class.

Gdk is a cross-platform low-level abstraction of a windowing system.
It's probably the best you're going to get considering the information
you want.  If you are deploying your app to both Windows and Linux, you
can always abstract the information you want behind an interface and
supply one implementation for each platform -- one for Gdk and one for
Winforms.  Then, when you consider which UI to show, also consider which
implementation to use.

If you want a library-independent mechanism, then you're going to have
to resort to P/Invokes.  And that would be a worse situation.

> Anyway it is bad implemented on current 
> System.Windows.Forms.SystemInformation class, my Linux box returns
> hades (hostname) instead of claunia.com (domain name).


Chris Howie

If you correspond with me on a regular basis, please read this document:

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5


This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.

More information about the Gtk-sharp-list mailing list