Determine when dragging a form has stopped.
Determine when dragging a form has stopped.
am 20.11.2007 21:47:35 von Peter Schwartz
How can I programmatically determine when a MDI child form has been dragged
from one location to another within its MDI parent form? Ideally I'd like to
trap some event that occurs when the dragging has stopped.
Thanks.
Re: Determine when dragging a form has stopped.
am 20.11.2007 22:44:44 von John Sheppard
Id say the dragging stops when the user lets go of the mouse button...
As for stopped moving I guess you could make ur own event....
Im a noob tho so im not sure...
"Bob Johnson" wrote in message
news:u%23bzPa7KIHA.3400@TK2MSFTNGP03.phx.gbl...
> How can I programmatically determine when a MDI child form has been
> dragged from one location to another within its MDI parent form? Ideally
> I'd like to trap some event that occurs when the dragging has stopped.
>
> Thanks.
>
Re: Determine when dragging a form has stopped.
am 21.11.2007 02:16:08 von Peter Schwartz
Hi John,
If you are not sure, or don't even have the foggiest idea of how to be
helpful here, then please feel free to NOT respond.
The problem with responding with useless information - as you did here - is
that it creates the perception that the question has in fact been answered.
The problem here is that others who might know the answer or could be
actually helpful might not bother to read the original question.
BTW: How in the world would you- in your best of intentions - think that
your answers could be in any way helpful? Am I supposed to read what you
wrote and think - "yes - that's it!". Sheesh. "user let's go of the mouse
button. Okay - great - how do we trap for that? "make ur own event" -
what? "ur" --- you are apparently so lazy that you can't even write out
"your". And even if I can get past that (which I can), then, okay I'll
write my own event... followup question for you then - when do I fire my own
event? - let me gusss - when the user "lets go" of the mouse button. Okay
great - how do we determine that? Oh, let me guess - I'll write my own
event. Wash, rinse, repeat - brilliant!
-Bob
"John Sheppard" wrote in message
news:fhvkg40iav@news4.newsguy.com...
> Id say the dragging stops when the user lets go of the mouse button...
>
> As for stopped moving I guess you could make ur own event....
>
> Im a noob tho so im not sure...
>
> "Bob Johnson" wrote in message
> news:u%23bzPa7KIHA.3400@TK2MSFTNGP03.phx.gbl...
>> How can I programmatically determine when a MDI child form has been
>> dragged from one location to another within its MDI parent form? Ideally
>> I'd like to trap some event that occurs when the dragging has stopped.
>>
>> Thanks.
>>
>
Re: Determine when dragging a form has stopped.
am 21.11.2007 03:03:24 von Peter Duniho
On 2007-11-20 17:16:08 -0800, "Bob Johnson" said:
> Hi John,
>
> If you are not sure, or don't even have the foggiest idea of how to be
> helpful here, then please feel free to NOT respond.
>
> The problem with responding with useless information - as you did here - is
> that it creates the perception that the question has in fact been answered.
> The problem here is that others who might know the answer or could be
> actually helpful might not bother to read the original question.
For what it's worth, the thing most likely to get in the way of you
getting a good answer to your question is the broad, inappropriate
cross-posting. The more newsgroups you include, the more likely it is
you'll attract answers from someone who isn't going to provide the
answer you want or think is useful.
Also, I don't really see the point in berating the answer you got.
Maybe it wasn't really helpful, but I didn't see any sign that the guy
was yanking your chain. Assuming he was really trying to help,
criticizing him isn't a great way to encourage other people that also
might really try to help.
Pete
Re: Determine when dragging a form has stopped.
am 21.11.2007 06:19:27 von Peter Schwartz
RE:
>>I don't really see the point in berating the answer you got.
The point is to discourage such useless posts... my little part to help with
the signal-to-noise ratio. And yes, I know, explaining that, in itself,
hurts the signal-to-noise ratio...
RE:
>> broad, inappropriate cross-posting.
Gotcha - maybe just the winforms group would have been best. I did think
about it before doing it, though... seems like nobody knew the answer to my
earlier/similar question from yesterday - so figured I'd widen the scope a
bit and refocus the question. I didn't know that 3 groups would be
considered as "broad"... I'll take that into account in the future.
Back to the OP: After all this there is apparently there is no way to
determine when a user has stopped moving/dragging a mdi child form. Do you
have any ideas on that?
Re: Determine when dragging a form has stopped.
am 21.11.2007 08:57:32 von John Sheppard
Sorry,
Perhaps it wasnt helpful...but sometimes when no one else can answer little
things can trigger to help you think of other things...just offering what
little I know is all...
I guess what I was trying to get at, was that do you mean drag and drop as
you want to track when the mouse button is let go, or do you mean move as in
when the drag moves over a pixel...I realise i didnt state that very well
and that wasnt very helpful.
How could you have an event that determines when it stops moving? that would
require a timer and as far as I know there is no property that stores one.
So I'd guess youd have to make your own...
John
"Bob Johnson" wrote in message
news:Oh3IX4$KIHA.5860@TK2MSFTNGP04.phx.gbl...
>
>
> RE:
>>>I don't really see the point in berating the answer you got.
>
> The point is to discourage such useless posts... my little part to help
> with the signal-to-noise ratio. And yes, I know, explaining that, in
> itself, hurts the signal-to-noise ratio...
>
> RE:
>>> broad, inappropriate cross-posting.
> Gotcha - maybe just the winforms group would have been best. I did think
> about it before doing it, though... seems like nobody knew the answer to
> my earlier/similar question from yesterday - so figured I'd widen the
> scope a bit and refocus the question. I didn't know that 3 groups would be
> considered as "broad"... I'll take that into account in the future.
>
> Back to the OP: After all this there is apparently there is no way to
> determine when a user has stopped moving/dragging a mdi child form. Do you
> have any ideas on that?
>
Re: Determine when dragging a form has stopped.
am 21.11.2007 23:00:36 von Peter Schwartz
> On topic, See if you can figure out what to do with the following:
>
> private const int WM_NCMOUSEMOVE = 0xa0;
> private const int WM_NCLBUTTONDOWN = 0xa1;
> private const int WM_NCLBUTTONUP = 0xa2;
> private const int HTCAPTION = 2;
> private const int SC_MOVE = 0xF010;
> private const int WM_SYSCOMMAND = 0x0112;
>
> protected override void WndProc(ref System.Windows.Forms.Message
> pMessage)
> {
> switch (pMessage.Msg)
> {
> case WM_NCMOUSEMOVE:
> Console.WriteLine("WM_NCMOUSEMOVE");
> break;
> case WM_NCLBUTTONDOWN:
> Console.WriteLine("WM_NCLBUTTONDOWN");
> break;
> case WM_NCLBUTTONUP:
> Console.WriteLine("WM_NCLBUTTONUP");
> break;
> case HTCAPTION:
> Console.WriteLine("HTCAPTION");
> break;
> case SC_MOVE:
> Console.WriteLine("SC_MOVE");
> break;
> case WM_SYSCOMMAND:
> Console.WriteLine("WM_SYSCOMMAND");
> break;
> }
>
> base.WndProc(ref pMessage);
> }
Perfect! Thank you so much. Not only is this a big shove in the right
direction, but I can see possible uses for it beyond my immediate needs.
RE: the other guy - the self-poclaimed "noob" (whatever that is), here is
some excellent reading:
http://www.catb.org/~esr/faqs/smart-questions.html
While that article is about posting questions, many of the points and
certainly the spirit of the document can easily be generalized to responding
to questions. The document is a bit lengthy, so I'll point out that one
important point the document states is that it's totally unhelpful - even
irrellevant to anything - to point out oneself as a "newbie" (or "noob" for
the lazy). Why the self-effacing blather? It's unprofessional, unhelpful,
and irrellevant. And we're not "texting" each other here. So no need to go
with all the contractions... r u ok wit dat? ROTFLMAO! How are we supposed
to take you seriously when you come to this group with that (rhetorical
question).
-Bob
Re: Determine when dragging a form has stopped.
am 22.11.2007 12:46:55 von John Sheppard
if its a decent document, and I don't know cause I'm not going to read
it....Id say it says stuff about pejoratives and narcissism...
John
"Bob Johnson" wrote in message
news:eixyynILIHA.4880@TK2MSFTNGP03.phx.gbl...
>> On topic, See if you can figure out what to do with the following:
>>
>> private const int WM_NCMOUSEMOVE = 0xa0;
>> private const int WM_NCLBUTTONDOWN = 0xa1;
>> private const int WM_NCLBUTTONUP = 0xa2;
>> private const int HTCAPTION = 2;
>> private const int SC_MOVE = 0xF010;
>> private const int WM_SYSCOMMAND = 0x0112;
>>
>> protected override void WndProc(ref System.Windows.Forms.Message
>> pMessage)
>> {
>> switch (pMessage.Msg)
>> {
>> case WM_NCMOUSEMOVE:
>> Console.WriteLine("WM_NCMOUSEMOVE");
>> break;
>> case WM_NCLBUTTONDOWN:
>> Console.WriteLine("WM_NCLBUTTONDOWN");
>> break;
>> case WM_NCLBUTTONUP:
>> Console.WriteLine("WM_NCLBUTTONUP");
>> break;
>> case HTCAPTION:
>> Console.WriteLine("HTCAPTION");
>> break;
>> case SC_MOVE:
>> Console.WriteLine("SC_MOVE");
>> break;
>> case WM_SYSCOMMAND:
>> Console.WriteLine("WM_SYSCOMMAND");
>> break;
>> }
>>
>> base.WndProc(ref pMessage);
>> }
>
> Perfect! Thank you so much. Not only is this a big shove in the right
> direction, but I can see possible uses for it beyond my immediate needs.
>
> RE: the other guy - the self-poclaimed "noob" (whatever that is), here is
> some excellent reading:
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>
> While that article is about posting questions, many of the points and
> certainly the spirit of the document can easily be generalized to
> responding to questions. The document is a bit lengthy, so I'll point out
> that one important point the document states is that it's totally
> unhelpful - even irrellevant to anything - to point out oneself as a
> "newbie" (or "noob" for the lazy). Why the self-effacing blather? It's
> unprofessional, unhelpful, and irrellevant. And we're not "texting" each
> other here. So no need to go with all the contractions... r u ok wit dat?
> ROTFLMAO! How are we supposed to take you seriously when you come to this
> group with that (rhetorical question).
>
> -Bob
>
Re: Determine when dragging a form has stopped.
am 22.11.2007 16:57:37 von Peter Schwartz
> it....Id say it says stuff about pejoratives and narcissism...
Speaking of pejoratives - referring to onesself as a "noob" is quite the
pejorative. And I agree with you 100% if you are implying that such
pejoratives should be avoided.
-Bob