Author Topic: Disable keyboard input using GetPoint Method  (Read 2477 times)

0 Members and 1 Guest are viewing this topic.

Civil1

  • Guest
Disable keyboard input using GetPoint Method
« on: January 06, 2006, 02:49:19 PM »
Does anyone know how to disable the keyboard input while using the GetPoint method?  What I want to do is force the user to select a point instead of typing in coordinates.

Chuck Gabriel

  • Guest
Re: Disable keyboard input using GetPoint Method
« Reply #1 on: January 06, 2006, 10:12:53 PM »
I think this could be done using the WIN32 API, but the code to do it would likely be more lengthy, complex and crash-prone than the whole of the rest of your application.

If you want to pursue it, look into the SetWindowsHookEx function for starters.  We can probably answer any questions you might have along the way and maybe even help with a little code.  Be forwarned though, this is just a theory.  I haven't tried it in the real world, and you could potentially invest a lot of time in a solution only to find that it really isn't feasible.

uncoolperson

  • Guest
Re: Disable keyboard input using GetPoint Method
« Reply #2 on: January 07, 2006, 02:45:23 AM »
couldn't you use some fancy grread-ness?

Civil1

  • Guest
Re: Disable keyboard input using GetPoint Method
« Reply #3 on: January 08, 2006, 01:04:07 PM »
Thanks for the input,

I found a work around to it, by using the  getvariable ("LASTPROMPT") and using InitializeUserInput 1 to disable null input.  Then I test the "LASTPROMPT" variable to see if there was anything typed on the keyboard, if there was somthing typed, disregard and send them back to select on screen.  It seems to be doing the trick so far.