Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
This snippet shows how to hide the start button....
Author:
Alliance Group
E-mail:
Click to e-mail author
Submitted:
2/19/2003
Version:
VB6
Compatibility:
VB6
Category:
Windows API
Views:
13659
This snippet shows how to hide the start button.
Declarations:
Option Explicit Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Const GW_CHILD = 5 Private Const GW_HWNDNEXT = 2 Private Const SW_HIDE = 0 Private Const SW_SHOW = 5 Private Const GW_HWNDFIRST = 0 Private Const GW_HWNDLAST = 1 Private Const GW_HWNDPREV = 3 Dim fWnd As Long, gWnd As Long, IpClass As String * 250, gClass As Long
Code:
Private Sub Form_Load() HideWnd End Sub Function ShowWnd() As String fWnd = FindWindow("Shell_TrayWnd", vbNullString) gWnd = GetWindow(fWnd, GW_CHILD) gClass = GetClassName(gWnd, IpClass, 250) IpClass = Left$(IpClass, gClass) If Left$(IpClass, 6) = "Button" Then ShowWindow gWnd, SW_SHOW End If End Function Function HideWnd() As String fWnd = FindWindow("Shell_TrayWnd", vbNullString) gWnd = GetWindow(fWnd, GW_CHILD) gClass = GetClassName(gWnd, IpClass, 250) IpClass = Left$(IpClass, gClass) If Left$(IpClass, 6) = "Button" Then ShowWindow gWnd, SW_HIDE End If End Function Private Sub Form_Unload(Cancel As Integer) ShowWnd End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement