Your'e trying to get everyone here to debug your code for you. That's not going to happen.
The debugger is there to debug YOU, to give you a tool to understands how your code works, what it's really doing, to increase your understanding.
The problem with the code you have is that you didn't write it and have no idea how it's supposed to work. This is where the debugger is an indispensable tool, to better your understanding of how the code works.
Hi, does someone know how to gain exclusive control of a human interface device input stream in c#? I have a keyboard and a magnetic stripe card reader and I don't want the card reader to write outside of my application and the keyboard to write inside.
No it does not. The text editor reads from the input stream or device and receives whatever data is available from that device. The actual transfer of the data is handled by Windows responding to a device signalling that it has data available.
how to randomly the Question from Databse Without repetion
Looks like you need to use the same algorithm as the one used to shuffle a deck of cards.
1) make an array the size of your number of questions, fill it with question numbers.
2) draw a position in possible ones, swap with last question, repeat without the last place.
for usage: get questions numbers from array in order.
This way you shuffle 52 questions with 51 draws, no repetition.
“Everything should be made as simple as possible, but no simpler.” Albert Einstein