SVN r1192
SVN-Revision: r1192
This commit is contained in:
@@ -447,6 +447,12 @@ namespace Lskj.Main
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.WindowState == FormWindowState.Normal)
|
||||
{
|
||||
EnsureFormInCurrentScreen();
|
||||
//Screen screen = Screen.FromControl(this);
|
||||
//this.MaximumSize = screen.WorkingArea.Size;
|
||||
}
|
||||
this.WindowState = this.WindowState == FormWindowState.Normal ? FormWindowState.Maximized : FormWindowState.Normal;
|
||||
if (this.WindowState == FormWindowState.Maximized)
|
||||
{
|
||||
@@ -585,6 +591,10 @@ namespace Lskj.Main
|
||||
base.OnMouseUp(e);
|
||||
_isMouseDown = false;
|
||||
//this.Focus();
|
||||
if (this.WindowState == FormWindowState.Normal)
|
||||
{
|
||||
EnsureFormInCurrentScreen();
|
||||
}
|
||||
this.mainPanelControlEx.pic_search.Focus();//点击界面失去焦点
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -677,4 +687,49 @@ namespace Lskj.Main
|
||||
public uint dwActiveProcessorMask;
|
||||
public uint dwNumberOfProcessors;
|
||||
public uint dwProcessorType;
|
||||
public uint dwAllocationGra
|
||||
public uint dwAllocationGranularity;
|
||||
public uint dwProcessorLevel;
|
||||
public uint dwProcessorRevision;
|
||||
}
|
||||
//定义内存的信息结构
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct MEMORY_INFO
|
||||
{
|
||||
public uint dwLength;
|
||||
public uint dwMemoryLoad;
|
||||
public uint dwTotalPhys;
|
||||
public uint dwAvailPhys;
|
||||
public uint dwTotalPageFile;
|
||||
public uint dwAvailPageFile;
|
||||
public uint dwTotalVirtual;
|
||||
public uint dwAvailVirtual;
|
||||
}
|
||||
//定义系统时间的信息结构
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct SYSTEMTIME_INFO
|
||||
{
|
||||
public ushort wYear;
|
||||
public ushort wMonth;
|
||||
public ushort wDayOfWeek;
|
||||
public ushort wDay;
|
||||
public ushort wHour;
|
||||
public ushort wMinute;
|
||||
public ushort wSecond;
|
||||
public ushort wMilliseconds;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 多屏时设置程序大小
|
||||
/// </summary>
|
||||
private void EnsureFormInCurrentScreen()
|
||||
{
|
||||
if (this.WindowState != FormWindowState.Normal)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Screen screen = Screen.FromPoint(System.Windows.Forms.Control.MousePosition);
|
||||
Rectangle workingArea = screen.WorkingArea;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user