Sign in with
Sign up | Sign in
Your question

2 monitors, 2 keyboards, 2 mice on 1 PC

Last response: in Applications
Share
January 29, 2013 9:39:20 PM

is there a place where I can find sample code to allow me to control my computer with visual basic (VB6) so that I can have one person view and input data on the host monitor, while at the same time a second user views on an external monitor some, but not all of the data that the first user sees, and who then inputs data into the computer using an external keypad? This is for a psychological experiment in which the experimenter is using the host computer system and the subject is using the external monitor and keypad. Thank you. Jim King
a b L Programming
a b C Monitor
January 29, 2013 10:11:31 PM

You cannot do that with just Visual Basic. On Windows, all attached keyboard inputs are summed into a singe message queue, as are all attached mice.

However, if you are willing to write your own keypad driver using C++ you could access the keypad directly and read its input separately from the normal keyboard input.
m
0
l
January 29, 2013 11:02:19 PM

actually, the keypad is not an issue-it doesnt have to be independent. the only thing i want to keep separated are the images that the subject sees on the external monitor. he or she should only be able to see what I want them to see. the experimentes can see everything
m
0
l
Related resources
a b L Programming
a b C Monitor
January 30, 2013 7:05:18 PM

Then that is trivial since you just need to open two windows, and you should easily find sample code for that.
m
0
l
January 30, 2013 7:51:03 PM

PhilFrisbie said:
Then that is trivial since you just need to open two windows, and you should easily find sample code for that.


ok, then if it's trivial, please answer me this, where can I find sample code to open one window in the host monitor and a different window in the client monitor? It may be trivial to you, but I don't have a clue where to look to find such code.
m
0
l
a b L Programming
a b C Monitor
January 30, 2013 7:59:51 PM

You don't need any special code. your application just opens the two windows and you drag one onto the second monitor and leave the other on the first monitor.
m
0
l
January 30, 2013 8:50:23 PM

Ijack said:
You don't need any special code. your application just opens the two windows and you drag one onto the second monitor and leave the other on the first monitor.



iJack, That's very interesting! I wasn't aware you could do that. And can you set up dual controls so that only parts of the "host" screen are displayed on the "client" screen that you dragged over to the second monitor? Oh and thanks for your input, my friend.
m
0
l
a b L Programming
a b C Monitor
January 30, 2013 10:30:45 PM

Ijack said:
You don't need any special code. your application just opens the two windows and you drag one onto the second monitor and leave the other on the first monitor.

Yes, it is just that simple!
m
0
l
!