How to hide taskbar button of a window?
作者:kmzs 日期:2009-01-03
In REALbasic, some types of window show buttons on taskbar in default. However, you may want to hide the taskbar button in some cases. For example, you want to use a document window as a modeless dialog, or you want to use a plain box as a splash window or a customized tooptip/popup window (not like REALbasic, most Windows applications won't display buttons on taskbar for their splash windows, such as Word, Windows Live Mail or RealPlayer). Simply add the follow code to the Open event handle of the window.
原载本人英文Blog。
复制内容到剪贴板
程序代码

#if TargetWin32 Then
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Int32, ByVal nIndex As Int32, ByVal dwNewLong As Int32) As Int32
Const GWL_EXSTYLE = -20
Const WS_EX_TOOLWINDOW = &H80
Call SetWindowLong(Self.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW)
#endif
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Int32, ByVal nIndex As Int32, ByVal dwNewLong As Int32) As Int32
Const GWL_EXSTYLE = -20
Const WS_EX_TOOLWINDOW = &H80
Call SetWindowLong(Self.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW)
#endif
原载本人英文Blog。
[本日志由 kmzs 于 2009-01-08 11:25 PM 编辑]






评论: 0 | 引用: -11 | 查看次数: -
发表评论