using System;
using System
using System
using System
namespace TransForm
{
class WinAPI
{
[DllImport(
public extern static IntPtr GetDesktopWindow();
[DllImport(
public extern static bool SetLayeredWindowAttributes(IntPtr hwnd
public static uint LWA_COLORKEY =
public static uint LWA_ALPHA =
[DllImport(
public extern static uint SetWindowLong(IntPtr hwnd
[DllImport(
public extern static uint GetWindowLong(IntPtr hwnd
public enum WindowStyle : int
{
GWL_EXSTYLE =
}
public enum ExWindowStyle : uint
{
WS_EX_LAYERED =
}
}
}
DeviceForm
using System;
using System
using System
using System
using System
using System
using System
namespace TransForm
{
public partial class Form
{
public Form
{
InitializeComponent();
}
private void Form
{
this
}
private void SetWindowTransparent(byte bAlpha)
{
try
{
WinAPI
WinAPI
WinAPI
}
catch
{
}
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base
cp
cp
return cp;
}
}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/11509.html