using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Dimmed_Api;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void cmdDimmMe_Click(object sender, EventArgs e)
{
Fade.FadeCreate(
Handle, 3500, ColorTranslator.ToWin32(Color.FromArgb(255, 255, 255)),
ColorTranslator.ToWin32(Color.FromArgb(0, 0, 0)));
}
private void cmdDimmDesktop_Click(object sender, EventArgs e)
{
Fade.FadeCreate(Fade.GetDesktopWindow(), 1500, ColorTranslator.ToWin32(Color.FromArgb(255, 255, 255)),
ColorTranslator.ToWin32(Color.FromArgb(0, 0, 0)));
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
Fade.FadeDestroy();
}
private void Form1_Load(object sender, EventArgs e)
{
Text = "Dimmed Sample " + "DLLVers. " + Fade.Dimmed_GetVersion();
}
}
}