Results 1 to 5 of 5

Thread: Detecting mouseclick on canvas

  1. #1
    Join Date
    May 2007
    Location
    Finland
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Detecting mouseclick on canvas

    what i need to know is that is it possible to detect mouse clicks on a canvas? Im making a game and it would require detecting if the user has clicked on the canvas. getting the coordinates would be cool too but i can solve that myself too. thanks.

  2. #2
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    If it's in a form then you can use OnClick
    Hup Holland Hup!

  3. #3
    Join Date
    May 2007
    Location
    Finland
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    tyvm

  4. #4
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    If you want to get the coords you can also use OnMouseDown. That also results the place were's clicked.

    procedure OnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

    procedure OnClick(Sender: TObject);
    Hup Holland Hup!

  5. #5
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    If you want to get the coords you can also use OnMouseDown. That also results the place were's clicked.

    procedure OnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

    procedure OnClick(Sender: TObject);
    OnMouseUp please... ^^
    Verrekte Koekwous

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Detecting mine...
    By Drakan in forum OSR Help
    Replies: 12
    Last Post: 05-14-2008, 01:04 AM
  2. Detecting Websites
    By Diabloizzle in forum C#/Visual Basic Help and Tutorials
    Replies: 10
    Last Post: 10-14-2007, 04:58 AM
  3. mouseclick...
    By pointer in forum OSR Help
    Replies: 2
    Last Post: 04-23-2007, 04:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •