<br> end;<br> MouseClicked:=False;<br>end;<br><br>procedure TForm1.ButtonMouseDown(Sender: TObject; Button: TMouseButton;<br> Shift: TShiftState; X, Y: Integer);<br>begin<br> if PtInRect(btnNewStart.BoundsRect,Point(X,Y)) then<br> MouseClicked:=True<br> else<br> MouseClicked:=False;<br>end;<br><br>procedure TForm1.FormDestroy(Sender: TObject);<br>begin<br> ShowWindow(SystemStartButton,SW_SHOW);<br>end;<br><br>procedure TForm1.FormActivate(Sender: TObject);<br>begin<br> Shell_TrayWnd:=FindWindow('Shell_TrayWnd','');<br> SystemStartButton:=GetWindow(Shell_TrayWnd,GW_CHILD);<br> ShowWindow(SystemStartButton,SW_HIDE);<br> btnNewStart:=TButton.CreateParented(Shell_TrayWnd);<br> btnNewStart.Caption := '新开始';<br> btnNewStart.OnMouseUp := ButtonMouseUp;<br> btnNewStart.OnMouseDown := ButtonMouseDown;<br> ShowWindow(btnNewStart.handle,SW_SHOW);<br>end;<br><br>end.<br>