Barre des tâches de Windows astuces & trucs


Quelques 'secrets' de la barre des tâches de Windows
Comment appuyer sur un bouton 'Démarrer' de votre programme:
procedure TForm1.PressStart(Sender: TObject)
var
& nbsp hTaskBar, hButton : HWND
& nbsp hDCScreen : HDC
& nbsp ScreenHeight : DWORD
begin
& nbsp & nbsp //trouver bouton 'Démarrer'
& nbsp & nbsp hDCScreen := GetDC(0)
& nbsp & nbsp ScreenHeight :=GetDeviceCaps(hDCScreen,VERTRES)
& nbsp & nbsp ReleaseDC(0, hDCScreen)
& nbsp & nbsp hTaskBar := FindWindow('Shell_TrayWnd', nil)
& nbsp & nbsp hButton := GetWindow(hTaskBar, GW_CHILD)
& nbsp & nbsp //appuyez sur 'Start' bouton
& nbsp & nbsp SendMessage(hButton, WM_LBUTTONDOWN,MK_LBUTTON,LOWORD(5)
& ! & ! & ! & nbsp HIWORD(ScreenHeight-20))
& nbsp & nbsp //masquer le bouton 'Démarrer'
& nbsp & nbsp ShowWindow(hButton, SW_HIDE)
& nbsp & nbsp Sleep(2000)
& nbsp & nbsp //afficher le bouton 'Démarrer'
& nbsp & nbsp ShowWindow(hButton, SW_NORMAL)
fin
Comment masquer et afficher la barre des tâches Windows:
procedure TForm1.HideTaskBar(Sender: TObject)
var
& nbsp H : HWND
begin
& ! & ! & ! & nbsp H := FindWindow('Shell_TrayWnd', nil)
& ! & ! & ! & nbsp ShowWindow(H, SW_HIDE)
& ! & ! & ! & nbsp Sleep(2000)
& ! & ! & ! & nbsp ShowWindow(H, SW_SHOW)
fin
Comment faire pour masquer un bouton de l'application de la barre des tâches Windows:
procedure TForm1.HideButton(Sender: TObject)
begin
& nbsp & nbsp ShowWindow(Application.Poignée,SW_HIDE)
fin
procedure TForm1.ShowButton(Sender: TObject)
begin
& nbsp & nbsp ShowWindow(Application.Poignée,SW_SHOW)
fin
sur Le même exemple, mais en utilisant l'API Windows:
var
& nbsp & nbsp m_hWnd : HWND
& nbsp & nbsp hMain : HWND
procedure TForm1.CreateWindow(Sender: TObject)
begin
& nbsp m_hWnd :=CreateWindowEx(0,'staic', ', WS_POPUP, 0,0,1600,1200,
& nbsp & nbsp & nbsp 0, 0, 0, nil)
& nbsp hMain := CreateWindowEx (0,'statique', 'de la fenêtre Principale',
& nbsp & nbsp WS_POPUP WS_VISIBLE, 40,50,200,300,m_hWnd, 0, 0, nil)
fin
procedure TForm1.HideWindow(Sender: TObject)
begin
& nbsp & nbsp //masquer le bouton
& nbsp & nbsp ShowWindow(hMain,SW_HIDE)
fin
procedure TForm1.ShowWindow(Sender: TObject)
begin
& nbsp & nbsp //bouton afficher
& nbsp & nbsp ShowWindow(hMain,SW_SHOW)
fin









Barre des taches de Windows astuces & trucs


Barre des taches de Windows astuces & trucs : Plusieurs milliers de conseils pour vous faciliter la vie.


Quelques 'secrets' de la barre des taches de Windows
Comment appuyer sur un bouton 'Demarrer' de votre programme:
procedure TForm1.PressStart(Sender: TObject)
var
& nbsp hTaskBar, hButton : HWND
& nbsp hDCScreen : HDC
& nbsp ScreenHeight : DWORD
begin
& nbsp & nbsp //trouver bouton 'Demarrer'
& nbsp & nbsp hDCScreen := GetDC(0)
& nbsp & nbsp ScreenHeight :=GetDeviceCaps(hDCScreen,VERTRES)
& nbsp & nbsp ReleaseDC(0, hDCScreen)
& nbsp & nbsp hTaskBar := FindWindow('Shell_TrayWnd', nil)
& nbsp & nbsp hButton := GetWindow(hTaskBar, GW_CHILD)
& nbsp & nbsp //appuyez sur 'Start' bouton
& nbsp & nbsp SendMessage(hButton, WM_LBUTTONDOWN,MK_LBUTTON,LOWORD(5)
& ! & ! & ! & nbsp HIWORD(ScreenHeight-20))
& nbsp & nbsp //masquer le bouton 'Demarrer'
& nbsp & nbsp ShowWindow(hButton, SW_HIDE)
& nbsp & nbsp Sleep(2000)
& nbsp & nbsp //afficher le bouton 'Demarrer'
& nbsp & nbsp ShowWindow(hButton, SW_NORMAL)
fin
Comment masquer et afficher la barre des taches Windows:
procedure TForm1.HideTaskBar(Sender: TObject)
var
& nbsp H : HWND
begin
& ! & ! & ! & nbsp H := FindWindow('Shell_TrayWnd', nil)
& ! & ! & ! & nbsp ShowWindow(H, SW_HIDE)
& ! & ! & ! & nbsp Sleep(2000)
& ! & ! & ! & nbsp ShowWindow(H, SW_SHOW)
fin
Comment faire pour masquer un bouton de l'application de la barre des taches Windows:
procedure TForm1.HideButton(Sender: TObject)
begin
& nbsp & nbsp ShowWindow(Application.Poignee,SW_HIDE)
fin
procedure TForm1.ShowButton(Sender: TObject)
begin
& nbsp & nbsp ShowWindow(Application.Poignee,SW_SHOW)
fin
sur Le meme exemple, mais en utilisant l'API Windows:
var
& nbsp & nbsp m_hWnd : HWND
& nbsp & nbsp hMain : HWND
procedure TForm1.CreateWindow(Sender: TObject)
begin
& nbsp m_hWnd :=CreateWindowEx(0,'staic', ', WS_POPUP, 0,0,1600,1200,
& nbsp & nbsp & nbsp 0, 0, 0, nil)
& nbsp hMain := CreateWindowEx (0,'statique', 'de la fenetre Principale',
& nbsp & nbsp WS_POPUP WS_VISIBLE, 40,50,200,300,m_hWnd, 0, 0, nil)
fin
procedure TForm1.HideWindow(Sender: TObject)
begin
& nbsp & nbsp //masquer le bouton
& nbsp & nbsp ShowWindow(hMain,SW_HIDE)
fin
procedure TForm1.ShowWindow(Sender: TObject)
begin
& nbsp & nbsp //bouton afficher
& nbsp & nbsp ShowWindow(hMain,SW_SHOW)
fin


Barre des tâches de Windows astuces & trucs

Barre des tâches de Windows astuces & trucs : Plusieurs milliers de conseils pour vous faciliter la vie.
Recommander aux amis
  • gplus
  • pinterest

Messages récents

Commentaire

Laisser un commentaire

évaluation