[英]APPBAR space allocation issue in Windows XP
I create an APPBAR in my WPF application, it is working fine in windows 7, but in XP it has an issue. 我在我的WPF应用程序中创建了一个APPBAR,它在Windows 7中工作正常,但在XP中它有一个问题。 After i close the application, i expect the space used by APPBAR should be free and reallocated to the desktop, but this does not happens in windows XP.
关闭应用程序后,我希望APPBAR使用的空间应该是免费的并重新分配到桌面,但这不会发生在Windows XP中。 But if i Lock/Unlock the taskbar then it allocate the space back to the system.
但是如果我锁定/解锁任务栏,那么它会将空间分配回系统。
Kindly guide me towards some solution to it. 请指导我找到解决方案。
public static void RemoveAppBar(Window appbarWindow)
{
RegisterInfo info = GetRegisterInfo(appbarWindow);
if (info.IsRegistered)
{
APPBARDATA abd = new APPBARDATA();
abd.cbSize = Marshal.SizeOf(abd);
abd.hWnd = new WindowInteropHelper(appbarWindow).Handle;
SHAppBarMessage((int)ABMsg.ABM_REMOVE, ref abd);
}
}
Call this method on App.Exit event and pass your appbar window on it. 在App.Exit事件上调用此方法并在其上传递appbar窗口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.