Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Question2: Cursor Position

Discussion in 'Information Technology' started by JK, Jul 28, 2006.

  1. JK

    JK
    Expand Collapse
    Guest

    Hi again,

    Is there a way to move the cursor on the screen without the mouse?

    The Problem:
    I use buttons that are in fact images. Each button is in fact 3 images that
    are changed through the "Picture" property by the Mouse events Move, Down
    and Up:

    1 Normal: when the cursor is anywhere on the form
    2. Point: when the cursor is on the button
    3. Down: when mouse button is down.

    The "on Mouse Up" sub set the button to Normal and does something (eg Close
    a form, opens another form etc.

    The problem is that because the cursor remains on the 'button" it
    immediately activate the "on Mouse Move" sub, correctly so, until I move the
    cursor with mouse. I want to move the cursor away from the "button" within
    the (MyButton)_OnMouseUp sub to anywhere on the screen the leave the
    "button" in a Normal state

    Is that possible?

    Regards/JK
     
  2. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    Have a look at the button demo at:

    http://www.datastrat.com/Download/MouseMove.zip

    In general, you want to use the Click event for the button's action or
    event.
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access

    "JK" <Nobody@Home.com> wrote in message
    news:e6jrcFVrGHA.4820@TK2MSFTNGP04.phx.gbl...
    > Hi again,
    >
    > Is there a way to move the cursor on the screen without the mouse?
    >
    > The Problem:
    > I use buttons that are in fact images. Each button is in fact 3 images
    > that are changed through the "Picture" property by the Mouse events Move,
    > Down and Up:
    >
    > 1 Normal: when the cursor is anywhere on the form
    > 2. Point: when the cursor is on the button
    > 3. Down: when mouse button is down.
    >
    > The "on Mouse Up" sub set the button to Normal and does something (eg
    > Close a form, opens another form etc.
    >
    > The problem is that because the cursor remains on the 'button" it
    > immediately activate the "on Mouse Move" sub, correctly so, until I move
    > the cursor with mouse. I want to move the cursor away from the "button"
    > within the (MyButton)_OnMouseUp sub to anywhere on the screen the leave
    > the "button" in a Normal state
    >
    > Is that possible?
    >
    > Regards/JK
    >
    >
    >
    >
    >
     
  3. JK

    JK
    Expand Collapse
    Guest

    Sorry for late response Arvin

    I had a look at your functions, this does not solve my problem, I explain
    based on your functions:

    Say, I invoke SetBold with OnMouseMove (on the button) and SetNormal() with
    mouse move outside the button. when I click the button to "do something"
    among all the "something" I invoke SetNormal() as I'm done with that button.
    However as the cursor is still on the button the SetBold() is invoked by
    MouseMove.

    What I'm looking for, Perhaps it is not possible, is to move the cursor
    (without moving the mouse) away from the button during "do something" in
    order to invoke SetNormal"

    Any ideas?

    Regards/JK


    "Arvin Meyer [MVP]" <a@m.com> wrote in message
    news:ev775RZrGHA.3764@TK2MSFTNGP02.phx.gbl...
    > Have a look at the button demo at:
    >
    > http://www.datastrat.com/Download/MouseMove.zip
    >
    > In general, you want to use the Click event for the button's action or
    > event.
    > --
    > Arvin Meyer, MCP, MVP
    > Microsoft Access
    > Free Access downloads
    > http://www.datastrat.com
    > http://www.mvps.org/access
    >
    > "JK" <Nobody@Home.com> wrote in message
    > news:e6jrcFVrGHA.4820@TK2MSFTNGP04.phx.gbl...
    >> Hi again,
    >>
    >> Is there a way to move the cursor on the screen without the mouse?
    >>
    >> The Problem:
    >> I use buttons that are in fact images. Each button is in fact 3 images
    >> that are changed through the "Picture" property by the Mouse events Move,
    >> Down and Up:
    >>
    >> 1 Normal: when the cursor is anywhere on the form
    >> 2. Point: when the cursor is on the button
    >> 3. Down: when mouse button is down.
    >>
    >> The "on Mouse Up" sub set the button to Normal and does something (eg
    >> Close a form, opens another form etc.
    >>
    >> The problem is that because the cursor remains on the 'button" it
    >> immediately activate the "on Mouse Move" sub, correctly so, until I move
    >> the cursor with mouse. I want to move the cursor away from the "button"
    >> within the (MyButton)_OnMouseUp sub to anywhere on the screen the leave
    >> the "button" in a Normal state
    >>
    >> Is that possible?
    >>
    >> Regards/JK
    >>
    >>
    >>
    >>
    >>

    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page