Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS100
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4ece321c
由
刘韬
编写于
2024-07-11 17:14:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化NS200窗口弹出
1 个父辈
aeedd0c5
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
8 行删除
DataHandling/DataHandling.csproj
SmartScan/PlusSettingFrm/FrmSetPlus.cs
SmartScan/Program.cs
DataHandling/DataHandling.csproj
查看文件 @
4ece321
...
...
@@ -34,9 +34,9 @@
<Reference Include="ConfigHelper">
<HintPath>..\..\NEWSISO\DLL\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=
2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL
">
<Reference Include="log4net, Version=
1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64
">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\..\CameraLibraryProject\CameraLibraryProject\CodeLibraryProject\CodeLibrary\bin\Debug
\log4net.dll</HintPath>
<HintPath>..\
SharedDll
\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
...
...
SmartScan/PlusSettingFrm/FrmSetPlus.cs
查看文件 @
4ece321
...
...
@@ -4,6 +4,7 @@ using Model;
using
SmartScan.PlusSettingFrm
;
using
System
;
using
System.Collections.Generic
;
using
System.Runtime.InteropServices
;
using
System.Windows.Forms
;
namespace
SmartScan
...
...
@@ -28,8 +29,9 @@ namespace SmartScan
private
void
FrmSetPlus_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
e
.
Cancel
=
true
;
this
.
WindowState
=
FormWindowState
.
Minimized
;
this
.
Hide
();
ShowWindow
(
this
.
Handle
,
SW_HIDE
);
//this.WindowState = FormWindowState.Minimized;
//this.Hide();
}
private
void
FrmSetPlus_SizeChanged
(
object
sender
,
EventArgs
e
)
...
...
@@ -113,8 +115,11 @@ namespace SmartScan
BLLCommon
.
extension
.
Update
();
DialogResult
=
DialogResult
.
OK
;
//WindowState = FormWindowState.Minimized;
}
ShowWindow
(
this
.
Handle
,
SW_HIDE
);
}
public
const
int
SW_HIDE
=
0
;
[
DllImport
(
"user32.dll"
,
EntryPoint
=
"ShowWindow"
,
CharSet
=
CharSet
.
Auto
)]
public
static
extern
int
ShowWindow
(
IntPtr
hwnd
,
int
nCmdShow
);
private
void
BtnCancel_Click
(
object
sender
,
EventArgs
e
)
{
DialogResult
=
DialogResult
.
Cancel
;
...
...
SmartScan/Program.cs
查看文件 @
4ece321
...
...
@@ -62,7 +62,7 @@ namespace SmartScan
if
(
formhwnd
!=
IntPtr
.
Zero
)
{
// 重新显示该窗体并切换到带入到前台
ShowWindow
(
formhwnd
,
SW_
RESTORE
);
ShowWindow
(
formhwnd
,
SW_
SHOW
);
SwitchToThisWindow
(
formhwnd
,
true
);
}
else
...
...
@@ -70,7 +70,7 @@ namespace SmartScan
formTitle
=
"Material Registration System"
;
formhwnd
=
FindWindow
(
null
,
formTitle
);
// 重新显示该窗体并切换到带入到前台
ShowWindow
(
formhwnd
,
SW_
RESTORE
);
ShowWindow
(
formhwnd
,
SW_
SHOW
);
SwitchToThisWindow
(
formhwnd
,
true
);
}
show
(
$
"窗体隐藏,查找软件窗口句柄:{formhwnd}"
);
...
...
@@ -201,7 +201,9 @@ namespace SmartScan
/// <returns>如果窗体之前是可见,返回值为非零;如果窗体之前被隐藏,返回值为零</returns>
[
DllImport
(
"user32.dll"
,
EntryPoint
=
"ShowWindow"
,
CharSet
=
CharSet
.
Auto
)]
public
static
extern
int
ShowWindow
(
IntPtr
hwnd
,
int
nCmdShow
);
public
const
int
SW_HIDE
=
0
;
public
const
int
SW_RESTORE
=
9
;
public
const
int
SW_SHOW
=
5
;
[
DllImport
(
"user32.dll"
)]
private
static
extern
int
GetWindowTextW
(
IntPtr
hWnd
,
[
MarshalAs
(
UnmanagedType
.
LPWStr
)]
StringBuilder
lpString
,
int
nMaxCount
);
#
endregion
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论