{
            hwnd = CreateWindowEx(0,
  Class2 .GetName (),
    Title ,
    WindowStyle .WS_POPUP ,
    x,
    y,
    Width ,
    Height ,
    IntPtr.Zero,
    IntPtr.Zero,
    Class2.GethInstance (),
    0);
            if (hwnd == IntPtr.Zero)
            {
                UInt32 errCode = GetLastError();
            }            ShowWindow(hwnd, 1);
            UpdateWindow(hwnd);            SetLayeredWindowAttributes(hwnd, RGB(255, 255, 255), 0, 2);如果把风格改成0 就不会变成忙碌

解决方案 »

  1.   

    dwFlags
    [in] Specifies an action to take. This parameter can be one or more of the following values.
    LWA_COLORKEY
    Use crKey as the transparency color.
    LWA_ALPHA
    Use bAlpha to determine the opacity of the layered window.
    LWA_ALPHA = 0x2;
    LWA_COLORKEY=0x1设置成3看
      

  2.   

    把form的FormBorderStyle设置成none不就是无边框的窗体么?
      

  3.   

    如果非要用api的话,SetLayeredWindowAttributes 需要窗口具有WS_EX_LAYERED风格