28 lines
805 B
C#
28 lines
805 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Remontor.Connector
|
|
{
|
|
internal class OneMon : IModeMon
|
|
{
|
|
[DllImport("user32.dll")]
|
|
static extern bool MoveWindow(IntPtr Handle, int x, int y, int w, int h, bool repaint);
|
|
public OneMon() { }
|
|
public override void Resize(Process Proc, Control View)
|
|
{
|
|
MoveWindow(Proc.MainWindowHandle, View.Bounds.X, View.Bounds.Y + 9, View.Bounds.Width, View.Bounds.Height, true);
|
|
}
|
|
public override IModeMon Change(IModeMon Mode)
|
|
{
|
|
if (Mode == this) return this;
|
|
return Mode;
|
|
}
|
|
}
|
|
}
|