[e]
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 System.Runtime.InteropServices;
namespace Aero
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "FindWindowA")]
private static extern int FindWindowA(string a, string b);
[System.Runtime.InteropServices.DllImport("dwmapis.dll", EntryPoint = "ifosvar")]
private static extern bool ifosvar(double a);
[System.Runtime.InteropServices.DllImport("dwmapis.dll", EntryPoint = "OnAero")]
private static extern void OnAero
(
int A1,
int A2,
bool A3,
int A4,
int A5,
int A6,
bool A7,
int A8,
int A9,
int A10,
int A11,
bool A12
);
AxWMPLib.AxWindowsMediaPlayer WMP = new AxWMPLib.AxWindowsMediaPlayer();
SkinSharp.SkinH_Net Skin_Net = new SkinSharp.SkinH_Net();
private void Form1_Load(object sender, EventArgs e)
{
SetSkinNetAero();
WMP = this.AxWMP;
WMP.Visible = !(true);
string[] a = new string[2];
a[1]=this.Text;
int Hwnd = new int();
this.openFileDialog1.FileName = "くぃんぅあんいやおぅあんぜでうぇんじあん";
this.openFileDialog1.Filter = "Mp3|*.Mp3";
this.openFileDialog1.Title = "Open";
Hwnd = FindWindowA(a[0], a[1]);
SetTouMing(Hwnd, this.BackColor.ToArgb(), 188, 2,true);
this.Text = "";
this.button1.Text = "Open(&P)";
}
void SetSkinNetAero()
{
this.Skin_Net.AttachEx("Aero.she", "");
this.Skin_Net.SetAero(-1);
}
void SetPeekOrAeroForm()
{
if (ifosvar(6) == true)
{
string[] t = new string[2];
t[1] = this.Text;
int Hwnd = Int32.Parse("0");
Hwnd = FindWindowA(t[0], t[1]);
int rgb = this.BackColor.ToArgb();
OnAero(Hwnd, 32, true, rgb, 238, 1, true, this.Top, this.Left, this.Width, this.Height, true);
}
}
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "GetWindowLongA")]
private static extern int GetWindowLongA(int hwnd, int nIndex);
// 获取窗口信息
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetWindowLongA")]
private static extern int SetWindowLongA(int hwnd, int nIndex, int dwNewLong);
// 设置窗口信息
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetLayeredWindowAttributes")]
private static extern int SetLayeredWindowAttributes(int hwnd, int crKey, int alrf, int dwFlags);
// 设置透明函数
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "AnimateWindow")]
private static extern int AnimateWindow(int hwnd, int dwTime, int dwFlags);
// 动画窗口
bool SetTouMing(int CHwnd, int CrKey, int bAlpha, int dwFlags,bool val)
{
if (val == true)
{
int Ret = new int();
Ret = GetWindowLongA(CHwnd, -20);
Ret = Ret | 524288;
SetWindowLongA(CHwnd, -20, Ret);
if (SetLayeredWindowAttributes(CHwnd, CrKey, bAlpha, dwFlags) != 0)
{
return true;
}
return false;
}
else
{
if (SetLayeredWindowAttributes(CHwnd, CrKey, bAlpha, dwFlags) != 0)
{
return true;
}
return false;
}
}