FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get the mouse position

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
tsalm



Joined: 18 Feb 2008
Posts: 26
Location: France

PostPosted: Mon Oct 20, 2008 3:19 pm    Post subject: Get the mouse position Reply with quote

Hello,

In first, thanks for this good library.

I would know if there's way to get the position of the mouse .

Thanks in advance,
TSalm
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Oct 20, 2008 10:42 pm    Post subject: Re: Get the mouse position Reply with quote

Mouse events give you the position, otherwise there's Cursor.position.
Back to top
View user's profile Send private message
tsalm



Joined: 18 Feb 2008
Posts: 26
Location: France

PostPosted: Tue Oct 21, 2008 3:11 pm    Post subject: Reply with quote

thanks !

This work perfectly :
Code:

class Drawer:Panel
{
    this()
    {
        mouseDown ~= &drawer_click ;
    }
   
    private void drawer_click(Control o,MouseEventArgs ea)
    {   
        with (ea)
        {
            msgBox(
                 (new Layout!(char)).convert("X:{},Y:{},dlt:{},btn:{},click:{}",x,y,delta,button,clicks)

                );
        }
    }
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group