3个回答
2013-11-11
展开全部
设置窗体属性:SHOWINTASKBAR=FALSE就可以不在任务兰显示.要在系统托盘显示图标,必须用API
Public Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias " Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long
Public Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uID As Long
uFlags As Long
uCallbackMessage As Long
hIcon As Long
szTip As String * 64
End Type
Public Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias " Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long
Public Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uID As Long
uFlags As Long
uCallbackMessage As Long
hIcon As Long
szTip As String * 64
End Type
2013-11-11
展开全部
让你的程序不在任务栏中显示
首先在一个模块中做如下声明:
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)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-11-11
展开全部
吧代码发出来我帮你看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询