472,993 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

How to create a new PowerScheme and set its Settings through C#

Hi

I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?

If not please suggest me, how can I achieve this through C# code.

Thanks
Cnu
Jul 22 '08 #1
3 1288
Cnu,

There are no .NET apis that expose the power management functionality.
You can make the calls to the API for power management through the P/Invoke
layer. The reference for the power management functions is here:

http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Duggi" <Du***************@gmail.comwrote in message
news:d3**********************************@m3g2000h sc.googlegroups.com...
Hi

I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?

If not please suggest me, how can I achieve this through C# code.

Thanks
Cnu

Jul 22 '08 #2
On Jul 22, 11:56*pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Cnu,

* * There are no .NET apis that expose the power management functionality.
You can make the calls to the API for power management through the P/Invoke
layer. *The reference for the power management functions is here:

http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx

--
* * * * * - Nicholas Paldino [.NET/C# MVP]
* * * * * - m...@spam.guard.caspershouse.com

"Duggi" <DuggiSrinivasa...@gmail.comwrote in message

news:d3**********************************@m3g2000h sc.googlegroups.com...
Hi
I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?
If not please suggest me, how can I achieve this through C# code.
Thanks
Cnu- Hide quoted text -

- Show quoted text -
Thanks for the reply. I think there is no other way of doing it...

-Cnu
Jul 24 '08 #3
On Jul 22, 11:56*pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Cnu,

* * There are no .NET apis that expose the power management functionality.
You can make the calls to the API for power management through the P/Invoke
layer. *The reference for the power management functions is here:

http://msdn.microsoft.com/en-us/libr...63(VS.85).aspx

--
* * * * * - Nicholas Paldino [.NET/C# MVP]
* * * * * - m...@spam.guard.caspershouse.com

"Duggi" <DuggiSrinivasa...@gmail.comwrote in message

news:d3**********************************@m3g2000h sc.googlegroups.com...
Hi
I would like to create a new power scheme and set its settings
appropriately. Are there any APIs available in .Net?
If not please suggest me, how can I achieve this through C# code.
Thanks
Cnu- Hide quoted text -

- Show quoted text -
Hi

I do not see any API that helps to set "Turn off Monitor" value of the
current power scheme. Can you please help me with some sample code
please.

-Cnu
-Cnu
Jul 24 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Elliott | last post by:
I can create this: ?xml version="1.0" standalone="yes" ?> <ConfigOpt> <record> <Field_1>Text # 1</Field_1> <Field_2>Text # 2</Field_2> </record> </ConfigOpt>
2
by: Danny Springer | last post by:
I am trying to create the following xml file with VS 2005: <?xml version='1.0' encoding='utf-8'?> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings"...
3
by: Luke Smith | last post by:
hi, i poster this to vsnet.general newsgroup but had no reply, sorry for xpost im trying to open a solution (same happens when making a new solution) but keep getting the following error message...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
2
by: Joe Rattz | last post by:
I am trying to create an XmlReader using XmlReader.Create, but it always returns {None}. I have tried several examples from the web, and Create always returns "{None}". Here is my code: ...
8
by: paraidy | last post by:
Hi all, as from object i need to read all byte from a file example c: \myphoto.jpg and recreate the file with another name to another directory c:\photo\recreatedphoto.jpg can someone write a...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
0
by: Dale | last post by:
Access 2000 I have a check scanner from Magtek, (MicrImage) This is like a "point of sale" check scanner/credit card reader. Magtek furnished 2 ocx's (MTMicrImage.ocx & SaxComm8.ocx). They also...
4
by: =?Utf-8?B?SlA=?= | last post by:
I have a C# DLL project I have created. The DLL plugs into other C#.NET applications. This DLL has several classes and methods comprised for 4 namespaces that are used by other programmer to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.