[Visual Basic]VB源代码推荐: 动态的显示/隐藏start按钮
2000-12-20 02:33
417 查看
VB源代码推荐 : 动态的显示/隐藏start按钮
' #VBIDEUtils#**********************************************
' * Programmer Name : Waty Thierry
' * Web Site : www.geocities.com/ResearchTriangle/6311/
' * E-Mail : waty.thierry@usa.net
' * Date : 22/10/98
' * Time : 15:50
' * Module Name : Start_Module
' * Module Filename : Start.bas
' *********************************************************
' * Comments : Show/Hide the start button
' *
' ********************************************************
Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias _
"FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Function hideStartButton()
'This Function Hides the Start Button'
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", _
vbNullString)
ShowWindow OurHandle&, 0
End Function
Public Function showStartButton()
'This Function Shows the Start Button'
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", _
vbNullString)
ShowWindow OurHandle&, 5
End Function
' #VBIDEUtils#**********************************************
' * Programmer Name : Waty Thierry
' * Web Site : www.geocities.com/ResearchTriangle/6311/
' * E-Mail : waty.thierry@usa.net
' * Date : 22/10/98
' * Time : 15:50
' * Module Name : Start_Module
' * Module Filename : Start.bas
' *********************************************************
' * Comments : Show/Hide the start button
' *
' ********************************************************
Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias _
"FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Function hideStartButton()
'This Function Hides the Start Button'
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", _
vbNullString)
ShowWindow OurHandle&, 0
End Function
Public Function showStartButton()
'This Function Shows the Start Button'
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", _
vbNullString)
ShowWindow OurHandle&, 5
End Function
相关文章推荐
- CSS动态实现文本框清除按钮的隐藏与显示
- dskinlite(uieasy mfc界面库)使用记录3:绘制动态元素(按钮控件通过隐藏方式修改图片显示)
- easyUI动态设置显示隐藏折叠按钮(在JS中实现)
- 返回顶部按钮响应滚动且动态显示与隐藏
- Ext设置按钮动态隐藏和显示
- 返回顶部按钮响应滚动且动态显示与隐藏
- dskinlite(uieasy mfc界面库)使用记录3:绘制动态元素(按钮控件通过隐藏方式修改图片显示)
- jquery实现隐藏与显示动画效果/输入框字符动态递减/导航按钮切换
- jquery实现隐藏与显示动画效果/输入框字符动态递减/导航按钮切换
- CSS动态实现文本框清除按钮的隐藏与显示
- iOS9之后动态控制状态栏隐藏和显示
- MFC创建非模态对话框并用按钮显示和隐藏非模态对话框
- 解决easyui动态隐藏或显示列导致列表排版错乱的问题
- Android动态显示隐藏密码输入框的内容
- UniDBGrid增加显示记录数的label及隐藏refresh按钮
- 动态隐藏/显示系统状态栏
- 动态显示和隐藏datagrid中列
- 借用鼠标指定的对象实现动态显示和隐藏菜单
- 单击单选按钮显示隐藏层的问题
- 在Repeater下控制显示隐藏按钮