Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loosing Mouse and Keyboard Control

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
GB
I believe these problems are linked. I keep on loosing mouse control, keyboard control and my cursor goes. These controls come back should I go into another program such as word. I believe this all comes from the video controls I,m using to play video clips. I actually using the _multimedia class in the foxpro samples. One or two of you have helped in the last week. However I'm still strugling. Does someone know either a better way of showing video clips or how I can make sure I have these control of my keyboard and mouse.
 
Having looked at this problem further I am convinced that when the cursor is not working the "command button" click procedures do not work. Therefore when the cursor is not working the click activates the screen click event. Does this help anyone out there to help me???? Thanks
 
Honestly, it sounds like your program is in a loop. If you have code in an event/method/prg file that loops forever and can't get out, then VFP will never get out of that loop to check for events (mouse clicks, keystrokes, etc.)

Try to trace your code to exactly where you lose keyboard/mouse control and see if there is something like that. If you have a loop that you want to run continuously and don't want to use a timer event, then try inserting a "DOEVENTS()" line at the end of the loop to give VFP the chance to process user input and other events.
 
It definatley is not in a loop.

I know this is really strange however I do know that the mouse does not activate the commnad button click when the cursor is lost. These two are definatelt linked. Should I jump from Foxpro to word, or any other program, both the mouse and cursor work again. Any other suggestions?????????
 
Is there any particular point that the mouse/keyboard loss occurs, or is it apparently random?
 
Hi

The lost of the mouse/keyboard is random however the keyboard has only been lost a couple of times. The mouse and cursor are lost frequently. Should the cursor be lost the mouse click activates the Form click procedure not the command click. Below are a list of things which may help someone to help me to solve this problem.

1 This only happens when I'm using _multimedia class located in the foxpro samples

2 When leaving the form the video files is closed (I think this is where the cursor is lost)

3 If the cursor is not active on the next form the mouse click (when returning to the video form) will definately activate the "form" click procedure

4 The mouse/cursor does come back, not sure how. However should you have another program running and switch to that program, perhaps excell or word, when you come back to the foxpro program the cursor is flashing once again.

Hope someone can help!!!
 
Hi all

I have done a very tempory fix for this problem. When leaving this screen I do the following. Have screen alwaysontop, run dir *.ddd, alwaysontop = .f.. Obviously this is a right bodge of a job but it tempory solves my problem.

It appears if I go out of the program, IE run dir *.ddd, then come back in the mouse/cursor controls are reset. Really do not know why this should be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top