DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

1
kicks
submitted by crpietschmann crpietschmann 1 year, 5 months ago

betterthaneveryone.com — I get a bit irked when I see stuff that can be solved but people just complain about it. News.com, slashdot, zdnet … list goes on and on about people jumping on the bandwagon. So you know what, I attempted to fix it. Ok, here is my solution. I spent more time prepping this post than writing the application.

Add a comment 3 comments | category: | Views: 2 | Get KickIt image code
tags: , , , | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;

using Microsoft.Win32;

namespace VistaLaptopBatterySaver
{
public partial class Form1 : Form
{
/*
* Copyright Clint Rutkas May 2007
*
*/
[DllImport(“dwmapi.dll”, PreserveSig = false)]
public static extern void DwmEnableComposition(bool bEnable);

[DllImport(“dwmapi.dll”, PreserveSig = false)]
public static extern bool DwmIsCompositionEnabled();

public Form1()
{
InitializeComponent();
enableToolStripMenuItem.Checked = DwmIsCompositionEnabled();
}

private void Form1_Load(object sender, EventArgs e)
{
SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
UpdatePowerInfo();
}

private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
UpdatePowerInfo();
}

private void UpdatePowerInfo()
{
if (enableToolStripMenuItem.Checked)
{
PowerStatus ps = SystemInformation.PowerStatus;

DwmEnableComposition((ps.PowerLineStatus == PowerLineStatus.Online));
}
}

private void enableToolStripMenuItem_CheckStateChanged(object sender, EventArgs e)
{
UpdatePowerInfo();
}

private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}

private static void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
AboutBox ab = new AboutBox();
ab.Show();
}
}
}
posted by crpietschmann crpietschmann 1 year, 5 months ago
No explanation as to what it does or how it is supposed to affect battery life.
posted by yesthatmcgurk yesthatmcgurk 1 year, 5 months ago
It disables Aero when on battery power. Then re-enables it when plugged back in.
posted by crpietschmann crpietschmann 1 year, 5 months ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge