我想在窗口启动时将其显示在任务栏的时钟上面。
如何找到我的桌面右下角位置?
我使用这段代码,在Windows Forms应用程序中运行良好,但在WPF中无法正确运行:
var desktopWorkingArea = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;
this.Left = desktopWorkingArea.Right - this.Width;
this.Top = desktopWorkingArea.Bottom - this.Height;
public MainWindow() { InitializeComponent(); this.Loaded += new RoutedEventHandler(Window_Loaded); }
这是调用它的方法。 - equiman