2个回答
展开全部
首先在一个模块中做如下声明:
Public Const SW_HIDE = 0
Public Const GW_OWNER = 4
Declare Function GetWindow Lib "user32 " Alias "GetWindow " (ByVal hwnd As _
Long, ByVal wCmd As Long) As Long
Declare Function ShowWindow Lib "user32 " Alias "ShowWindow " (ByVal hwnd _
As Long, ByVal nCmdShow As Long) As Long
将下面的代码添加到窗体的Load事件中:
Dim rc As Long
Dim OwnerhWnd As Long
'让窗体不可见
Me.Visible = False
'从任务管理器列表中移除
OwnerhWnd = GetWindow(Me.hWnd, GW_OWNER)
rc = ShowWindow(OwnerhWnd, SW_HIDE)
Public Const SW_HIDE = 0
Public Const GW_OWNER = 4
Declare Function GetWindow Lib "user32 " Alias "GetWindow " (ByVal hwnd As _
Long, ByVal wCmd As Long) As Long
Declare Function ShowWindow Lib "user32 " Alias "ShowWindow " (ByVal hwnd _
As Long, ByVal nCmdShow As Long) As Long
将下面的代码添加到窗体的Load事件中:
Dim rc As Long
Dim OwnerhWnd As Long
'让窗体不可见
Me.Visible = False
'从任务管理器列表中移除
OwnerhWnd = GetWindow(Me.hWnd, GW_OWNER)
rc = ShowWindow(OwnerhWnd, SW_HIDE)
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
解决方案:
在MFC中的窗体显示格式编辑函数格式ModifyStyleEx
//隐藏对话框
ModifyStyleEx(WS_EX_APPWINDOW,WS_EX_TOOLWINDOW);
WINDOWPLACEMENT wp; //显示隐藏
wp.length=sizeof(WINDOWPLACEMENT);
wp.flags=WPF_RESTORETOMAXIMIZED;
wp.showCmd=SW_HIDE;
SetWindowPlacement(&wp);
这个方法的话可以修改窗口的显示方式,但是没有实现需求目标。
在MFC中的窗体显示格式编辑函数格式ModifyStyleEx
//隐藏对话框
ModifyStyleEx(WS_EX_APPWINDOW,WS_EX_TOOLWINDOW);
WINDOWPLACEMENT wp; //显示隐藏
wp.length=sizeof(WINDOWPLACEMENT);
wp.flags=WPF_RESTORETOMAXIMIZED;
wp.showCmd=SW_HIDE;
SetWindowPlacement(&wp);
这个方法的话可以修改窗口的显示方式,但是没有实现需求目标。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询