Program Won't Run When F5 Pressed
Mar 30, 2012So i just wrote this awesome program, but now it doesn't run when I try to! When I press F5, or press the run button, this error happens:
View 6 RepliesSo i just wrote this awesome program, but now it doesn't run when I try to! When I press F5, or press the run button, this error happens:
View 6 RepliesI am making a Tetris program and I have a 2d array 10 by 20 for the grid.I want the Tetris blocks I have created to move down one block every second unless the user presses "a" or "d" (to move left or right) then the block should move left or right whilst moving down.The problem is that I have created a loop for it to delay a bit but then it waits for the user to press a key until it continues the program. So the block will stop moving down and just stay where it is until they press something.I have been told that you can do this in C with something like if keyboardhit or kybd() or something then it will read the key but otherwise it will just skip that bit and loop round. So how can I do this in VB?
View 2 RepliesHow can I set a button, so that when it is pressed, it stays in the pressed down graphic state. Then when pressed again it returns to the normal not-pressed visual.Make a button stay like this until pressed again: url....
View 3 RepliesI have a TextBox and set the MiltiLine property to true and AcceptsTab property to false.When the TextBox has focus and i press Tab it works fine and the next control get the focus, but when i press Ctrl+Tab it works as if AcceptsTab property is set to true and makes a tab character into the TextBox.The reason i press Ctrl+Tab.. when switching between forms in my MDI application.Now how to make a Ctrl+Tab when pressed works like Tab when pressed in a MultiLine TextBox?
View 1 RepliesI am wondering on how to write the code such that the program will respond when 2 arrow keys are pressed at the same time. In other words, I would like to have the program to behave like a racing game.
View 1 RepliesI have an application that the main screen currently has all exit functionality removed by use of a class. I want a certain key combination to exit the program, but cannot figure out how to do this. I.E. Ctrl + X.
[Code]...
In my program, if something goes wrong an ErrorForm is supposed to show up and tell what was going wrong.
And if the error is a "fatal type", then I want the program just display the ErrorForm (which gives some information about the error), wait for a button press, and then close the program (terminate run).
In case of error, the form is displayed.. That's good.
But as the program is supposed to terminate after showing the error form, the error form disappears immediately after showing up (so it doesn't allow the user any time to read what's going wrong).
How can I make the program wait until a button press (on the error form) and then terminate?
I've been trying to figure out a simple keypress handling event.I have the code working fine after hunting for a couple of days on the net but have a problem getting rid of the obnoxious bong that comes along with hitting the ENTER key.I've attempted some solutions on the web about changing the KeyAscii to 0 but under that method I cannot even get the program to recognize the key is even being pressed.The code I have so far is as follows and I'm just trying to get rid of the audible bong.
[code]...
i have a program called Vip Task Manager.This program lets me set up task which others have to complete.When they are done with a task they have to mark it "completed" and make a report on what they have done and used to perform this task.Vip Task Manager has a button which directs them to an upload form, now when they press the "open" button I would like this to happen: Open a certain report making program I made myself.When they finished writing their report and press save, the program saves this report on a dedicated network HDD (.txt file) and closes itself.Then add the file or link to the upload form in Vip Task Manager.What it all comes down to is that they dont have to minimize Vip task manager, open the report making software, save it, go to vip task manager, press upload, press open, look where this file is saved, select it, and upload it.now, typed in red is whats already been taken care of.The rest, I have no idea where to begin to be honest.First I want to find out how to retrieve that a button is pressed in a existing program. (dont know which code it is written in and it is not open source)
View 10 RepliesI am trying to make a blackjack program and I need to execute a different piece of code each time a button is pressed by the user.
View 5 RepliesPrivate Sub ContextMenuStrip_ForDisplay_Opening(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStrip_ForDisplay.Opening
If Utility.IsKeyDown(Keys.S) OrElse Utility.IsKeyDown(Keys.V) Then
[Code]....
I do the above to cancel the menu if S or V is pressed.
I'd like to cancel if ANY key is pressed.
i have a pocket pc that have some special keys and i need detect when a key is pressed in my program. how can i detect the keys that is pressed? i have tested in a textbox change function the box detect all keys except that special keys there is some api to look for alk keys thats is pressed in pocket pc?
View 3 RepliesI need to check if the SHIFT or CTRL keys are being pressed in my VB.net application? (get a boolean)
View 3 RepliesHow would I check if a key is currently being pressed?
Also how would I detect if a key is pressed without using the KeyDown event. The reason I am not using the keydown event is when the user holds down a key it calls the event, waits a second than keeps calling it. I do not want the wait period if a user is holding down a key.
All i wish to do is have some simple code, which can detect when the esc key is pressed, (if possible can you point out where i need to change to set it for an other key).
View 5 RepliesHow do I find out if any key is pressed during a certain time?i have a timer to the "certain time" is no problem.But how do I find if any key is pressed?
View 14 RepliesI'm looking for a way to find when no key is pressed. I'm creating a game and I have an animated characted. When you press the movement keys he moves and is animated. I need to know when no keys are being pressed so I can tell the animation to stop.
View 1 RepliesThis may sound like a dumb question but I need to know. I know you can tell which keys are pressed on the keyboard but I like to know if I can do something.Ok, heres what I am trying to do. A user is in another program that is max on the screen. He has to press Print Screen to take a screenshot, but he got to min the screen he is in to paste the screenshot into paint. This causes slow loads on maxing that screen and sometimes crashs of the program. I already got the code done to check when the program is running and to capture the screenshot and save it. What I to do now is, find out while in the other program with my program running in the background, if the user has pushed the Print Screen button.
View 2 RepliesHow do i get if a Key is pressed on the whole form. Like A? or Ctrl + A
View 5 Replies'pressing F1 key on main form. I dont know how to trap whether user pressed F1 key or not
Private Sub frmMain_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
Dim KeyAscii As Long = Asc(e.KeyChar)
[code]....
How to make a key being pressed do something?If 'w' is pressed, then...
View 2 RepliesI want to make it so that if the key 'shift' is pressed it does something. I have this VB.Net
If Keys.Shift = 1 then
MessageBox.Show("pressed shift")
I have a webform and i want to detect if F5 button was pressed or if the page was refreshed. I know about postback but it is not what i'm looking for. I have a gridview that loads in a modal popup when a button is clicked and a parameter's value is set for the gridview. When refresh is hit and if the modal popup button was previously clicked the modal popup is visible right after refresh. I want to detect if the page is refreshed to prevent this. any ideas? I thought to try Override but I'm not exactly sure how to use it. I tried Control.ModifierKeys but I don't have access to ModifierKeys.
View 2 RepliesHow can I check if a perticular button was pressed first?
I need something along the lines of:
if btnNewGame.wasPressedFirst then
do this
else
do this
How do I check if Control + Z is being pressed?
I managed to check for when one key is being pressed, but apparently I can't check for two at the same time.
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
What is the keyValue I need for checking for the DELETE key using e.keyValue?
Im doing a small project in visual basic which involves lighting up leds through the parallel port and turning them on and of. each led is controlled by a checkbox on my form and they only come on when the checkbox is checked.
what code do i need to use to have the checkbox checked when a key is pressed but when the key is released the checkbox is unchecked i have already tried keydown which will check the box when a key is pressed but will not uncheck it when the key is released
If e.KeyValue = Keys.A Then
CheckPin1.CheckState = CheckState.Checked
ElseIf e.KeyValue <> Keys.A Then
CheckPin1.CheckState = CheckState.Unchecked
End If
How can i count keys pressed within ex. 1 min? Or how do i count a spesific key?
View 1 Replieshow can I check with getasynckeystate, if ctrl+c was pressed?
getasynckeystate(17) and getasynckeystate(67) doesn't seem to work
even getasynckeystate(17) and getasynckeystate(67) and &H8000 doesn't work too
I know that you cannot disable Ctrl Alt Del for security reasons. I was able to figure out how to disable ALT+F4 in my application though. What I am wanting to know is if anyone can give me some code to where If CTRL ALT DEL is pressed then my application will close. I have tried everything, and I just cannot seem to get the program to recognize if the user presses ctrl alt delete.
So basically I need some code that detects if a user presses ctrl alt delete then if htye did it closes the application.
(I am making a quiz program.)
PS: I am on Windows 7 RC and I also use Windows Vista. I am using Visual Studio 2008 Professional Edition.