Amiguinho,
Codigo :
#include "FiveWin.ch"
#include "dll.ch"
#Define SW_HIDE 0 // &H0
#Define SW_SHOWNA 8 // &H8
#Define SW_SHOW 5 // &H5
#Define SW_SHOWNORMAL 1
static oWnd
//----------------------------------------------------------------------------//
function Main()
DEFINE WINDOW oWnd TITLE "Boton Iniciar de Win 7"
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION TaskBarInvisivel()
DEFINE BUTTON OF oBar ACTION TaskBarVisivel()
DEFINE BUTTON OF oBar ACTION StartButtonInvisivel()
DEFINE BUTTON OF oBar ACTION StartButtonVisivel()
SET MESSAGE OF oWnd TO "Boton Iniciar de Win 7" NOINSET CLOCK DATE KEYBOARD
ACTIVATE WINDOW oWnd //;
//ON INIT( HIDETASKBAR() )
return nil
//----------------------------------------------------------------------------//
FUNCTION TaskBarInvisivel()
ShowWindow( FindWindow( "Shell_TrayWnd", "" ), 0 ) // Taskbar
//ShowWindow( FindWindow( "Button", "Start" ), 0 ) // Vista round button
RETURN NIL
//----------------------------------------------------------------------------//
FUNCTION TaskBarVisivel()
ShowWindow( FindWindow( "Shell_TrayWnd", "" ), 1 ) // Taskbar
//ShowWindow( FindWindow( "Button", "Start" ), 1 ) // Vista round button
RETURN NIL
//----------------------------------------------------------------------------//
FUNCTION StartButtonInvisivel()
ShowWindow( FindWindowEx( FindWindow( "Shell_TrayWnd", "" ), 0, "Button", nil ), 0 ) // Taskbar
ShowWindow( FindWindowEx( FindWindow( "Button", "Start" ), 0, "Button", nil ), 0 ) // Vista round button
RETURN NIL
//----------------------------------------------------------------------------//
FUNCTION StartButtonVisivel()
ShowWindow( FindWindowEx( FindWindow( "Shell_TrayWnd", "" ), 0, "Button", nil ), 1 ) // Taskbar
ShowWindow( FindWindowEx( FindWindow( "Button", "Start" ), 0, "Button", nil ), 1 ) // Vista round button
RETURN NIL
DLL32 FUNCTION FindWindowEx( hWndParent AS LONG, hWndChildAfter AS LONG, lpszClass AS STRING, lpszWindow AS STRING ) AS LONG PASCAL FROM "FindWindowExA" LIB "user32"
Testei no Windows 2003 Server e no Windows Seven Ultimate.
- Os dois primeiros botões manejam a barra em si, sendo que no W2K3 esconde tudo e mostra tudo. No W7 esconde/mostra somente a barra.
- Os dois segundos botões manejam o botão Iniciar, sendo que no W2K3 esconde/mostra. No W7 voce terá de mesclar os comandos para esconder a barra e o botão junto já que ocorre algo estranho.
Mas o básico é isto ai. Bom trabalho.