SVN r887
SVN-Revision: r887
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing.Text;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Lskj.U
|
||||||
@@ -184,7 +184,8 @@ namespace Lskj.Util
|
|||||||
{
|
{
|
||||||
if (exeMainHandle == IntPtr.Zero)
|
if (exeMainHandle == IntPtr.Zero)
|
||||||
return;
|
return;
|
||||||
MoveWindow(exeMainHandle, 0, 0, control.Width, control.Height, true);
|
//SetWindowPos(exeMainHandle, IntPtr.Zero, 0, 0, control.Width, control.Height, SWP_NOZORDER);
|
||||||
|
MoveWindow(exeMainHandle, 0, 0, control.Width, control.Height, false);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 把 string[] 类型的参数数组转换为单个命令行字符串,自动添加引号并转义
|
/// 把 string[] 类型的参数数组转换为单个命令行字符串,自动添加引号并转义
|
||||||
@@ -262,24 +263,10 @@ namespace Lskj.Util
|
|||||||
/// <param name="exeMainHandle"></param>
|
/// <param name="exeMainHandle"></param>
|
||||||
public static void SetFormNoneStyle(IntPtr exeMainHandle, System.Windows.Forms.Control control)
|
public static void SetFormNoneStyle(IntPtr exeMainHandle, System.Windows.Forms.Control control)
|
||||||
{
|
{
|
||||||
// 移除窗口边框和标题栏
|
|
||||||
//int style = GetWindowLong(exeMainHandle, GWL_STYLE);
|
|
||||||
//style &= ~WS_CAPTION;
|
|
||||||
//style &= ~WS_THICKFRAME;
|
|
||||||
//style &= ~WS_MINIMIZE;
|
|
||||||
//style &= ~WS_MAXIMIZEBOX;
|
|
||||||
//style &= ~WS_SYSMENU;
|
|
||||||
//SetWindowLong(exeMainHandle, GWL_STYLE, style);
|
|
||||||
// 使样式更新生效
|
|
||||||
//SetWindowPos(exeMainHandle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
|
|
||||||
// 将exe窗口设置为panel的子窗口
|
// 将exe窗口设置为panel的子窗口
|
||||||
SetParent(exeMainHandle, control.Handle);
|
SetParent(exeMainHandle, control.Handle);
|
||||||
// 调整大小填充panel
|
// 调整大小填充panel
|
||||||
ResizeEmbeddedWindow(exeMainHandle, control);
|
ResizeEmbeddedWindow(exeMainHandle, control);
|
||||||
// 最后显示嵌入窗口
|
|
||||||
ShowWindow(exeMainHandle, SW_SHOW);
|
|
||||||
//JobControl clsJobControl = new JobControl();
|
|
||||||
//clsJobControl.AddProcess(control.Handle);
|
|
||||||
// 自动响应panel大小变化调整嵌入窗口大小
|
// 自动响应panel大小变化调整嵌入窗口大小
|
||||||
control.Resize += (s, e) =>
|
control.Resize += (s, e) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -119,6 +119,7 @@
|
|||||||
<Compile Include="extend\ListExtend.cs" />
|
<Compile Include="extend\ListExtend.cs" />
|
||||||
<Compile Include="extend\StringExtend.cs" />
|
<Compile Include="extend\StringExtend.cs" />
|
||||||
<Compile Include="FontHelper.cs" />
|
<Compile Include="FontHelper.cs" />
|
||||||
|
<Compile Include="FontUtil.cs" />
|
||||||
<Compile Include="FormHelper.cs" />
|
<Compile Include="FormHelper.cs" />
|
||||||
<Compile Include="GraphicsText.cs" />
|
<Compile Include="GraphicsText.cs" />
|
||||||
<Compile Include="HandleHelper.cs" />
|
<Compile Include="HandleHelper.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user