Tutoriale Linux, Tutoriale Programare, Tutoriale retele, tutoriale photoshop

Cod:

procedure SetTop(Top : Boolean; Handle : HWND);
Begin
  If Top Then Begin
    SetWindowPos(Handle,HWND_TOPMOST,0,0,0,0,SWP_SHOWWINDOW+SWP_NOMOVE+SWP_NOSIZE);
    SetWindowPos(Handle,HWND_TOP,0,0,0,0,SWP_SHOWWINDOW+SWP_NOMOVE+SWP_NOSIZE);
              End
         Else SetWindowPos(Form1.Handle,HWND_NOTOPMOST,0,0,0,0,SWP_SHOWWINDOW+SWP_NOMOVE+SWP_NOSIZE);
End;

Se foloseste pentru a pune o forma Always on Top. Se apeleaza cu SetTop(True, Form1.Handle) sau SetTop(False,Form1.Handle). Functioneaza mult mai bine decat daca Always on Top e pus din proprietatile formei :D

Ethical hacking and programming community