Dears, the following code work without any problem in VB: ' #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 I translate it to AutoIT language as follow: #Include <WinAPI.au3>
hideStartButton()
Sleep(1000)
showStartButton()
Func hideStartButton()
;This Function Hides the Start Button
$OurParent = _WinAPI_FindWindow("Shell_TrayWnd", "")
$OurHandle = DllCall("user32.dll","long","FindWindowExA","long",$OurParent,"long",0,"str","Button","str",'')
$r2 = DllCall("user32.dll","long","ShowWindow","long",$OurHandle,"long",0)
EndFunc
Func showStartButton()
;This Function Shows the Start Button
$OurParent = _WinAPI_FindWindow("Shell_TrayWnd", "")
$OurHandle = DllCall("user32.dll","long","FindWindowExA","long",$OurParent,"long",0,"str","Button","str",'')
$r2 = DllCall("user32.dll","long","ShowWindow","long",$OurHandle,"long",5)
EndFunc but my translated code not worked in AutoIT. Anybody know what is my mistake? Thanks beforehand