int flags = user.GetWindowLong(hWnd, User32.GWL_EXSTYLE);
byte level = (byte)((int)(255 * alpha) & 0xFF);
if (usingUpdateLayeredWindow(w)) {
// If already using UpdateLayeredWindow, continue to
// do so
BLENDFUNCTION blend = new BLENDFUNCTION();
blend.SourceConstantAlpha = level;
blend.AlphaFormat = User32.AC_SRC_ALPHA;
user.UpdateLayeredWindow(hWnd, null, null, null, null,
null, 0, blend,
User32.ULW_ALPHA);