Getting the current system

  • Thread starter Thread starter Marco Martin
  • Start date Start date
M

Marco Martin

Hi,

I developed an application on my workstation which is a P4 2.4G. Now that
my application is almost finished, I find out that this app will be used on
the road by technicians using laptops(gota love inter-office communication).
This causes a *major* problem because my app is very UI intensive (its got
many graphs displayed in real-time) and tests on our own laptops show that
they just cant cut it. (I'm not saying anything againts laptops, beeing a
big fan myself, its just that their graphics adapters aren't as powerfull).

Anyway, I'm going to include two configurations of my program. A full
version for powerfull pcs, and another smaller, less intensive version for
older pcs/laptops.

My question is, is it possible for my app to know if its running on a
laptop, or a PentiumII? Is there a way for me to know what CPU is running
and at what speeds?

Thanks and best regards,

Marco
 
Marco,

You can definitely get this. You can get almost any system information
you want using the classes in the System.Management namespace. Basically,
you can query for WMI classes (which are not .NET classes) which have the
values that you want. You can get information about the processor, the
graphics card, etc, etc.

You probably want to look for instances of the Win32_Processor class and
the Win32_VideoController class.

Hope this helps.
 
Thanks Nicholas,

Thats exacly what I needed. Now I just have to figure out how I'm going to
use this information.

I'm trying to do something like;

if(bolCrappyCPU || bolCrappyVideoCard)
{
//do something
}
else
{
//do something else
}

regards,

Marco
Nicholas Paldino said:
Marco,

You can definitely get this. You can get almost any system information
you want using the classes in the System.Management namespace. Basically,
you can query for WMI classes (which are not .NET classes) which have the
values that you want. You can get information about the processor, the
graphics card, etc, etc.

You probably want to look for instances of the Win32_Processor class and
the Win32_VideoController class.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Marco Martin said:
Hi,

I developed an application on my workstation which is a P4 2.4G. Now that
my application is almost finished, I find out that this app will be used on
the road by technicians using laptops(gota love inter-office communication).
This causes a *major* problem because my app is very UI intensive (its got
many graphs displayed in real-time) and tests on our own laptops show that
they just cant cut it. (I'm not saying anything againts laptops, beeing a
big fan myself, its just that their graphics adapters aren't as powerfull).

Anyway, I'm going to include two configurations of my program. A full
version for powerfull pcs, and another smaller, less intensive version for
older pcs/laptops.

My question is, is it possible for my app to know if its running on a
laptop, or a PentiumII? Is there a way for me to know what CPU is running
and at what speeds?

Thanks and best regards,

Marco
 
Marco,

Since you said the graphs are the culprit, perhaps you can disable them,
or perhaps limit the number of data points on the graphs? I would think
that the graphs slow down when you have too much data on them.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Marco Martin said:
Thanks Nicholas,

Thats exacly what I needed. Now I just have to figure out how I'm going to
use this information.

I'm trying to do something like;

if(bolCrappyCPU || bolCrappyVideoCard)
{
//do something
}
else
{
//do something else
}

regards,

Marco
message news:[email protected]...
Marco,

You can definitely get this. You can get almost any system information
you want using the classes in the System.Management namespace. Basically,
you can query for WMI classes (which are not .NET classes) which have the
values that you want. You can get information about the processor, the
graphics card, etc, etc.

You probably want to look for instances of the Win32_Processor class and
the Win32_VideoController class.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Marco Martin said:
Hi,

I developed an application on my workstation which is a P4 2.4G. Now that
my application is almost finished, I find out that this app will be
used
on
the road by technicians using laptops(gota love inter-office communication).
This causes a *major* problem because my app is very UI intensive (its got
many graphs displayed in real-time) and tests on our own laptops show that
they just cant cut it. (I'm not saying anything againts laptops,
beeing
 
Definately. I'm wanting to turn them off, or maybe leave the option to see
one at a time. problem is, i have to find a way to take this information
and compare it to something. I'm just not sure what yet.

regards,

Marco
Nicholas Paldino said:
Marco,

Since you said the graphs are the culprit, perhaps you can disable them,
or perhaps limit the number of data points on the graphs? I would think
that the graphs slow down when you have too much data on them.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Marco Martin said:
Thanks Nicholas,

Thats exacly what I needed. Now I just have to figure out how I'm going to
use this information.

I'm trying to do something like;

if(bolCrappyCPU || bolCrappyVideoCard)
{
//do something
}
else
{
//do something else
}

regards,

Marco
message news:[email protected]...
Marco,

You can definitely get this. You can get almost any system information
you want using the classes in the System.Management namespace. Basically,
you can query for WMI classes (which are not .NET classes) which have the
values that you want. You can get information about the processor, the
graphics card, etc, etc.

You probably want to look for instances of the Win32_Processor
class
and
the Win32_VideoController class.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,

I developed an application on my workstation which is a P4 2.4G.
Now
that
my application is almost finished, I find out that this app will be used
on
the road by technicians using laptops(gota love inter-office
communication).
This causes a *major* problem because my app is very UI intensive
(its
got
many graphs displayed in real-time) and tests on our own laptops
show
that
they just cant cut it. (I'm not saying anything againts laptops,
beeing
a
big fan myself, its just that their graphics adapters aren't as
powerfull).

Anyway, I'm going to include two configurations of my program. A full
version for powerfull pcs, and another smaller, less intensive
version
for
older pcs/laptops.

My question is, is it possible for my app to know if its running on a
laptop, or a PentiumII? Is there a way for me to know what CPU is running
and at what speeds?

Thanks and best regards,

Marco
 
Back
Top