按钮背景不透明,在 windows form 应用程序中嵌入外部应用程序
CommonUtil.SetParent(mPPtRunHwnd, this.panel1.Handle);
long style = CommonUtil.GetWindowLong(mPPtRunHwnd, CommonUtil.GWL_STYLE);
style = style & ~((int)CommonUtil.WS_CAPTION) & ~((int)CommonUtil.WS_THICKFRAME) & ~CommonUtil.WS_POPUP; // Removes Caption bar and the sizing border
style |= ((int)CommonUtil.WS_CHILD)| CommonUtil.WS_EX_LAYERED | CommonUtil.WS_VISIBLE; // Must be a child window to be hosted
CommonUtil.SetWindowLong(mPPtRunHwnd, CommonUtil.GWL_STYLE, style);
CommonUtil.SetWindowPos(mPPtRunHwnd, CommonUtil.HWND_TOP, 100, 100, (int)500, (int)500, 0);
CommonUtil.ShowWindow(mPPtRunHwnd, CommonUtil.SW_SHOW);
我把外部应用程序窗口放到了中间层,但是上层的按钮不透明,
有什么办法让它正常显示吗?
这是截图