ralph
2/13/2012 12:54:00 AM
On Sun, 12 Feb 2012 15:34:50 -0500, "Farnsworth" <nospam@nospam.com>
wrote:
>"ralph" <nt_consulting64@yahoo.net> wrote in message
>news:4g0gj7pp07ptp0bpkhioph8pcgdi3o01qo@4ax.com...
>> Simply catch the Move messages.
>> (And/or any of many assorted messages fired when a Window is moved. Or
>> perhaps slap up a simpler modal dialog.)
>>
>> However ...
>>
>> A VB application consists of two threads, a main UI thread and a
>> second 'application' (for want of a better name) thread. Messages
>> arrive via the Forms engine. It is difficult to separate the two given
>> that Windows and VB are event-driven.
>
>I think you were trying to say something else, or perhaps referring to other
>languages, but VB is single threaded. ...
No actually I meant exactly what I said. A VB Application after
startup consists, at a minimum, of two threads. "Single-threaded" and
its cousin "single threaded apartments" does not mean there is only
one thread, it means only that one thread can run at a time.
But you are correct in noting that wasn't where I really needed to go,
nor all that edifying for the topic at hand, as the simple analogy of
a single path of execution is sufficient.
> ... When the form is moved, it enters into
>a modal loop(WM_ENTERSIZEMOVE/WM_EXITSIZEMOVE), so it seems as if the
>application has two message queues, and doesn't do much until the move has
>ended.
>
It has always been in this "modal loop". <g>
That is the essence of a Windows GUI program as everything runs from a
message (event) pump and returns to the pump for the next
message/event and thus the next procedure/s to run , ie a loop.
-ralph