private void MainWindow_LocationChanged(object sender, EventArgs e)
        {
            SecondWindow second = SecondWindow.Current;

            if (null != second)
            {
                second.Left = this.Left + this.ActualWidth;
                second.Top  = this.Top;
            }
        }
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            System.Windows.Vector res = new System.Windows.Vector(this.ActualWidth, this.ActualHeight);
            PresentationSource    presentationsource = PresentationSource.FromVisual(this);

            res = presentationsource.CompositionTarget.TransformToDevice.Transform(res);

            GraphicsSubsystem.NativeHandle = helper.Handle;
            GraphicsSubsystem.WindowWidth  = (int)res.X;
            GraphicsSubsystem.WindowHeight = (int)res.Y;

            SecondWindow second = new SecondWindow();

            second.Top   = this.Top;
            second.Left  = this.Left + this.ActualWidth;
            second.Owner = this;
            second.Show();
        }
 private void SecondWindow_Loaded(object sender, RoutedEventArgs e)
 {
     Current = this;
 }