locked
how could i disable the mouse when adding or editing in the form? RRS feed

  • Question

  • hello to the experts, good day to all

    how could i disable the mouse when adding or editing in the form?   it should reappear only after saving or undoing the data entry, Using only the function keys in all transaction made  When  pressing the desired key  to Add or Edit it should be hidden or disabled.

    thanks


    .madix_t
    Sunday, April 19, 2009 8:40 AM

Answers

  • You may change the mouse cursor shape to hourglass or other ...
    dni
    • Marked as answer by Riquel_Dong Friday, April 24, 2009 3:26 AM
    Monday, April 20, 2009 5:27 PM

All replies

  • I don't know. THere is a function ISMOUSE() that detects whether a mouse is present, but I don't think there is any native function to disable the mouse. In fact I don't even know of a way to do this using Windows API.

    You could add code to the MouseDown() that tests the from mode and issues a NoDefault if the form is in Add/Edit mode. But you would have to do this on a control by control basis - there is no method that handles it for a form and all its contained controls. That will effectively disable the mouse action for any control - but it doesn't stop the user from using the mouse to click into another control, or off the form which, I presume, is what you are trying to prevent.

    Windows is supposed to be mouse driven [shrug].



    -- Andy Kramek
    Sunday, April 19, 2009 11:13 AM
  • ahh OK i thought there was a function for that and i am just too lazy to look for it, so my simple solution is to ask at the forum,.... have a nice day AndyKr, thank you very much.
    .madix_t
    Sunday, April 19, 2009 11:27 AM
  • Well, thank you for answering the question I posed on my blog over two years ago:

    http://weblogs.foxite.com/andykramek/archive/2007/02/19/3330.aspx


    -- Andy Kramek
    • Proposed as answer by AndyKr Monday, April 20, 2009 12:03 AM
    Monday, April 20, 2009 12:02 AM
  • ha..ha..ha.. i read it Andy.... have a nice day
    .madix_t
    Monday, April 20, 2009 12:43 AM
  • Oh no.. don't do that. Your users will hate you. Many users prefer to use the keyboard, others prefer to use the mouse. Don't take away things that your user depends on and don't make your application function differently than all other Windows apps.
    MCSD, Visual FoxPro MVP
    Monday, April 20, 2009 2:45 PM
  • You may change the mouse cursor shape to hourglass or other ...
    dni
    • Marked as answer by Riquel_Dong Friday, April 24, 2009 3:26 AM
    Monday, April 20, 2009 5:27 PM
  • hello Craig that's my user wanted me to do, he wants me to disable the mouse because he used to work with his DOS application.  Well, the suggestion of dni is also a nice idea too, i'll try that.  thanks
    .madix_t
    Tuesday, April 21, 2009 12:18 AM