怎样让窗体不在任务栏中出现?
各位高手:
请问怎样让一个程序,不如很小的时钟,像qq那样只在任务栏的右边显示一个小图表。而不在下面的任务栏中显示?
问题点数:50、回复次数:3Top
1 楼wwqna(york)回复于 2004-12-03 19:53:39 得分 30
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const WS_POPUP = &H80000000
Private Const GWL_STYLE = (-16)
Private Const WS_EX_APPWINDOW = &H40000
Private Const GWL_EXSTYLE = (-20)
Private Const SW_HIDE = 0
Private Const SW_SHOW = 5
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Command1_Click()
Dim winstyle As Long
Dim hwndParent As Long
Dim childhwnd As Long
childhwnd = FindWindow(vbNullString, "Form1")
winstyle = GetWindowLong(childhwnd, GWL_EXSTYLE)
winstyle = winstyle And Not WS_EX_APPWINDOW
ShowWindow childhwnd, SW_HIDE ' 一定要先隐藏然后显示
SetWindowLong childhwnd, GWL_EXSTYLE, winstyle
ShowWindow childhwnd, SW_SHOW
End Sub
Top
2 楼creazyfish(梳分头的鱼)回复于 2004-12-03 22:21:12 得分 20
给你介绍个免费的控件,很好用的,我一直用的
这个是控件,只要下载后,在你机器的运行中用regsvr32 命令注册下就可以了http://www.applevb.com/control/taskicon.ocx
这个是demo,你可以看这个就知道怎么用这个控件了
http://www.applevb.com/control/taskicon_demo.zipTop
3 楼aohan(aohan)回复于 2004-12-03 22:30:58 得分 0
upTop




