From: David on
Mr. Johnson:

What may make menus different -- now that I think about it -- is that
menus are in the non-client area of the form not the client area.
Will have to delve further to compare how the client versus
non-client is handled.



"Jeff Johnson" <i.get(a)enough.spam> wrote in message
news:O0PTKSw5KHA.5476(a)TK2MSFTNGP06.phx.gbl...
> "David" <NoWhere(a)earthlink.net> wrote in message
> news:u9oTrrv5KHA.1932(a)TK2MSFTNGP05.phx.gbl...
>
>> I've looked up C++ menus and didn't see difference than
>> normal loop processing for other controls. Can you
>> point me in the right direction?
>
>
> No, I guess I can't. Maybe I'm completely wrong.
>


From: Nobody on
"David" <NoWhere(a)earthlink.net> wrote in message
news:OX9zlSw5KHA.5848(a)TK2MSFTNGP06.phx.gbl...
> No Timer. Graph is handled from the Picturebox Paint event.
> Tools are handled from the Picturebox Mouse events.

The problem that you are facing has nothing to do with modal, and everything
to do in how Windows captures the mouse when the mouse buttons goes down.
This is done to see if the button is released inside or outside the window.
If it's released inside the window, a click event is generated. If it's
released outside the window, it's ignored. Try clicking any OK button, and
before releasing the mouse, move it away from the OK button and you will
find that the OS has ignored it.

Windows does this by calling SetCapture() when the mouse button is down, and
calls ReleaseCapture() when it goes up.

One solution, and this may not be ideal, is to call the PictureBox's Paint
event in the PictureBox's MouseMove event every now and then when you the
left mouse button is down for a while. You can save Timer value in MouseDown
in a variable, then check the difference in time in MouseMove event. Again,
this may not be the best solution.



From: Nobody on
"David" <NoWhere(a)earthlink.net> wrote in message
news:OyZONcw5KHA.5808(a)TK2MSFTNGP02.phx.gbl...
> Mr. Johnson:
>
> What may make menus different -- now that I think about it -- is that
> menus are in the non-client area of the form not the client area.
> Will have to delve further to compare how the client versus
> non-client is handled.

For Popup menus, VB(and virtually all languages) uses TrackPopupMenu(Ex),
but the issue you have is not related to modal behavior.



From: David on
Nobody:

As always thanks for the input.

Regarding your suggestion about calling Paint from Mouse using a Timer
variable. Not really sure what you're getting at other than
possibly trying to create your own "Refresh" in the mouse Event?

If this is the case, my guess is that the mouse might hang more than
it does because of the time it takes to process all Paint calls.
If I have this wrong could you please elaborate.

I've seen other programs (e.g. stock charting applications) where
they seem to have solved this issue of real-time along with mouse usage --
but unknown how they did it? I mentioned Appleman previously and his
concept of a "State Machine(s)" to resolve this type of issue.. Whether
I've implemented his concept as intended is unknown -- did my best.




"Nobody" <nobody(a)nobody.com> wrote in message
news:ebYq$6w5KHA.5676(a)TK2MSFTNGP04.phx.gbl...
> "David" <NoWhere(a)earthlink.net> wrote in message
> news:OyZONcw5KHA.5808(a)TK2MSFTNGP02.phx.gbl...
>> Mr. Johnson:
>>
>> What may make menus different -- now that I think about it -- is that
>> menus are in the non-client area of the form not the client area.
>> Will have to delve further to compare how the client versus
>> non-client is handled.
>
> For Popup menus, VB(and virtually all languages) uses TrackPopupMenu(Ex),
> but the issue you have is not related to modal behavior.
>
>
>


From: GS on
Just a suggestion...

If you're referring to the Dan Appleman associated with Desaware, he's
been pretty good about conversing directly with me concerning issues
with his products/ideas. I think he'd be just as accommodating to you
if you were to contact him yourself to get his opinion about how you've
implemented is concept.

Kind regards,
Garry


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: touchpad programming
Next: Visual Basic.net