Click here to Skip to main content
15,904,288 members
Home / Discussions / C#
   

C#

 
AnswerRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
Luc Pattyn13-Mar-10 9:45
sitebuilderLuc Pattyn13-Mar-10 9:45 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
boreland13-Mar-10 10:07
boreland13-Mar-10 10:07 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
Luc Pattyn13-Mar-10 10:53
sitebuilderLuc Pattyn13-Mar-10 10:53 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
boreland13-Mar-10 10:58
boreland13-Mar-10 10:58 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
Luc Pattyn13-Mar-10 11:01
sitebuilderLuc Pattyn13-Mar-10 11:01 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
boreland13-Mar-10 11:11
boreland13-Mar-10 11:11 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
Luc Pattyn13-Mar-10 11:16
sitebuilderLuc Pattyn13-Mar-10 11:16 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
OriginalGriff13-Mar-10 21:46
mveOriginalGriff13-Mar-10 21:46 
To expand slightly on what I said above (inserting some of the bits I glossed over with "yada yada":
bool catchme = false;

private void frmMain_MouseDown(object sender, MouseEventArgs e)
    {
    catchme = true;
    }

private void frmMain_MouseUp(object sender, MouseEventArgs e)
    {
    catchme = false;
    }

private void frmMain_MouseMove(object sender, MouseEventArgs e)
    {
    if (catchme)
        {
        Location = System.Windows.Forms.Control.MousePosition;
        }
    }
Top left corner of the form follows the mouse. If you want some other part to follow it, you need to offset the Location by the start co-ords of the mouse when first pressed down - not too difficult!
I really wouldn't use a timer for this, unless you want the form to move around on a pre-set (or random if you must) path.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace

C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

AnswerRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
Abhinav S13-Mar-10 6:22
Abhinav S13-Mar-10 6:22 
GeneralRe: Moving (animating) a form using mouse coordinates similar to a tooltip. Pin
boreland13-Mar-10 6:40
boreland13-Mar-10 6:40 
QuestionMulti Finance Freeware / Shareware Pin
Endien13-Mar-10 4:58
Endien13-Mar-10 4:58 
AnswerRe: Multi Finance Freeware / Shareware Pin
Saksida Bojan13-Mar-10 5:43
Saksida Bojan13-Mar-10 5:43 
GeneralRe: Multi Finance Freeware / Shareware Pin
Endien13-Mar-10 6:20
Endien13-Mar-10 6:20 
QuestionHow to convert lat/long values to mils??? Pin
v17.poornima13-Mar-10 4:41
v17.poornima13-Mar-10 4:41 
AnswerRe: How to convert lat/long values to mils??? Pin
Saksida Bojan13-Mar-10 5:41
Saksida Bojan13-Mar-10 5:41 
GeneralRe: How to convert lat/long values to mils??? Pin
v17.poornima13-Mar-10 6:08
v17.poornima13-Mar-10 6:08 
GeneralRe: How to convert lat/long values to mils??? Pin
Saksida Bojan13-Mar-10 6:15
Saksida Bojan13-Mar-10 6:15 
GeneralRe: How to convert lat/long values to mils??? Pin
v17.poornima13-Mar-10 17:48
v17.poornima13-Mar-10 17:48 
GeneralRe: How to convert lat/long values to mils??? Pin
Saksida Bojan13-Mar-10 18:51
Saksida Bojan13-Mar-10 18:51 
AnswerRe: How to convert lat/long values to mils??? Pin
PIEBALDconsult13-Mar-10 14:45
mvePIEBALDconsult13-Mar-10 14:45 
GeneralRe: How to convert lat/long values to mils??? Pin
#realJSOP14-Mar-10 3:56
professional#realJSOP14-Mar-10 3:56 
GeneralRe: How to convert lat/long values to mils??? Pin
Dr.Walt Fair, PE18-Mar-10 8:16
professionalDr.Walt Fair, PE18-Mar-10 8:16 
AnswerRe: How to convert lat/long values to mils??? Pin
#realJSOP14-Mar-10 3:56
professional#realJSOP14-Mar-10 3:56 
AnswerRe: How to convert lat/long values to mils??? Pin
PIEBALDconsult14-Mar-10 4:27
mvePIEBALDconsult14-Mar-10 4:27 
QuestionHow to connect Legend and map control Pin
v17.poornima13-Mar-10 4:40
v17.poornima13-Mar-10 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.