NewsBot
1
<span class=value>,I could make startbutton disable with API Enablewindow in vista.
However my client ordered to hide startbutton....
I cannot find answer why Showwindow with SW_HIDE work just making start icon smaller.
this is my code,using listbox to enumerate all top-level windows.
*Private Declare Function ShowWindow Lib "user32.dll" (ByVal hWnd As Integer, ByVal nCmdShow As Integer) As Integer
* * Const SW_HIDE As Integer = 0
* * Const SW_SHOW As Integer = 5
'Get the process ID of the Explorer process that owns the task bar
* *target_hwnd1 = FindWindow("Shell_traywnd", "")
* *Call GetWindowThreadProcessId(target_hwnd1, target_process_id1)
* * * * * *hwnd = FindWindow(vbNullString, sTitle)
* * * * Call GetWindowThreadProcessId(hwnd, process_id)
* * * * If process_id = target_process_id1 Then
* * * * * * cch = GetWindowTextLength(hwnd)
* * * * * * cch = cch * 2
* * * * * * Temp = New String(Chr(0), cch)
* * * * * * 'get the windows caption
* * * * * * Call GetWindowText(hwnd, Temp, Len(Temp))
* * * * * * If InStr(Temp, "start") > 0 And InStr(Temp, "menu")
However my client ordered to hide startbutton....
I cannot find answer why Showwindow with SW_HIDE work just making start icon smaller.
this is my code,using listbox to enumerate all top-level windows.
*Private Declare Function ShowWindow Lib "user32.dll" (ByVal hWnd As Integer, ByVal nCmdShow As Integer) As Integer
* * Const SW_HIDE As Integer = 0
* * Const SW_SHOW As Integer = 5
'Get the process ID of the Explorer process that owns the task bar
* *target_hwnd1 = FindWindow("Shell_traywnd", "")
* *Call GetWindowThreadProcessId(target_hwnd1, target_process_id1)
* * * * * *hwnd = FindWindow(vbNullString, sTitle)
* * * * Call GetWindowThreadProcessId(hwnd, process_id)
* * * * If process_id = target_process_id1 Then
* * * * * * cch = GetWindowTextLength(hwnd)
* * * * * * cch = cch * 2
* * * * * * Temp = New String(Chr(0), cch)
* * * * * * 'get the windows caption
* * * * * * Call GetWindowText(hwnd, Temp, Len(Temp))
* * * * * * If InStr(Temp, "start") > 0 And InStr(Temp, "menu")