Iames, Sorry, I just noticed that you said top level form. This works for normal forms in the VFP Screen but I think you will need to use a Windows API. Can't try it out at the moment to try though.
Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Crozier Sent: 27 March 2007 22:38 To: 'ProFox Email List' Subject: RE: VFP9: Dragging a top-level form around Iames, What you need to do is the following: In the Init() of the form: with This .AddProperty("nMouse_X",0) .AddProperty("nMouse_Y",0) .AddProperty("nWindow_Top",0) .AddProperty("nWindows_Left",0) endwith * return In the Mousedown() of the Form: LPARAMETERS nButton, nShift, nXCoord, nYCoord * if nButton=1 with This .nMouse_X=Mcol(0,3) .nMouse_Y=Mrow(0,3) * .nWindow_Top=.Top .nWindows_Left=.Left Endwith Endif * return In the MouseMove() of the form: LPARAMETERS nButton, nShift, nXCoord, nYCoord * if nButton=1 With This .Left=.Left-(.nMouse_X-MCol(0,3)) .Top=.Top-(.nMouse_Y-MRow(0,3)) * .nMouse_X=Mcol(0,3) .nMouse_Y=Mrow(0,3) * Endwith Endif * Return This will allow the left Mouse button to be clicked, held down and the form to be dragged around the screen. Hope this helps. Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Iames Pizzoli Sent: 27 March 2007 18:35 To: Lista ProFox Subject: VFP9: Dragging a top-level form around Hi all, I'm at my first try with a top-level form. I've set these form properties: AutoCenter = .T. BorderStyle = 2 - Fixed dialog ShowWidow = 2 - As top-level form TitleBar = 0 - Off The form appears just like I want. BUT, without the title bar how can I let the user move the form around, if s/he wants to? I must be missing something obvious... TIA Iames -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Tutto per il Modding PC: Case, Led, Neon, Ventole. Il tuo PC personalizzato da noi conviene, visita il nostro sito Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6123&d=27-3 [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

