Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    [delphi] nascondere mouse quando è inattivo

    Ciao a tutti... c'è una funzione per nascondere/mostrare il mouse quando è inattivo da x tempo? come in realplayer quando visualizza i filmati per intenderci.

    grazie

  2. #2

    re

    Eccoti un pò di roba...ciao!

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ShowCursor(False); // Hide cursor
    end;


    procedure TForm1.Button2Click(Sender: TObject);
    begin
    ShowCursor(True); // Show cursor
    end;


    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
    ShowCursor(false);
    end;


    procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
    begin
    Timer3.Enable := false;
    Timer3.Enable := true;
    ShowCursor(true);
    end;

  3. #3
    a che serve il showCursor sull onclick dei bottoni 1 e 2?
    i timer sono 2?oppure è lo stesso ma hai sbagliato a scrivere? perchè a me non funziona lo nasconde e basta

  4. #4

    errata corrige

    No scusami è solo questo il codice che devi usare:


    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
    ShowCursor(false);
    end;


    procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
    begin
    Timer1.Enable := false;
    Timer1.Enable := true;
    ShowCursor(true);
    end;

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.