Check If Control + Z Is Being Pressed?
Apr 10, 2011How 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.
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.
I 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.
How 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
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?
How can I check if an arrow key (dunno, the right key for example) is pressed?
View 1 RepliesHow to check whether user pressed any key other than numeric in VB.NetWorking as a software engineer
View 2 Repliesi need to take input in text box that will be integer. when the button is press it will check whether the input is integer.
can i do this using isNumeric Function?how?
I got this timer tick function: Private Sub controlTick(ByVal sender As Object, ByVal e As EventArgs) Label2.Text = (Control.ModifierKeys = Keys.Control) End Sub
That is supposed to make my label say "True" if I am currently holding down the Control key, and "False" if I am not.But, how come my label is always "False"? What is interesting is that if I press the Control key at lighting speed a bunch of times I can see for a fraction of a second "True", but immediately turns to "False".
Timer ticks every 50ms.
I am working on an application and I need urgent help. One of my forms contains a web browser. I need to detect if F3 key is pressed while the web browser is active, so a dialog box will appear for a particular functionality of the application. But unfortunately web browser control does not have keyup, keydown or similar event to help me detect if the F3 key is pressed. As far as I know, one way to solve this problem is adding a menu which has F3 shortcut. But my application does not contain any menus, so I dont want use a menu in this part of the application.
View 1 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 Replieshow to detect which keyes are pressed on an infrared MCE remote control? I'm a n00b, I've searched google, and can't find anything in VB.
View 1 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 trying to do the following check to see if the user presses the Cancel button or the exit application (X). But for some reason it is not working. Can anyone let me know what am I doing wrong?
CheckCancel
If NewStationInfo.CancelButton.DialogResult = Windows.Forms.DialogResult.OK Then
do sometheing
[code].....
I am working on an inventory managment project for a lumber mill. I am currently writing a piece of software to be used on the sorting section of the mill. The problem I am having is when a stick of lumber needs to be cut down in lengt. My current setup has a combo box that is populated with lengths of lumber that we might have (2' - 60'), a "Add" button and a data control (homemade solution with lots of labels, and panels).
The user will scan a tag into the system, and the system pulls up the info from the db. If the piece need to be cut, the user will select the length of the cut, and click the add button. The system will then populate the first line of the data control with the info from the cut (previous piece info, and new length). It also populates a pieceObject struct. This happens for any additional cut that might happen.
The problem I am having is that everytime I press the "Add" button, the length variable will update every length in the piece array.
Here is a section of the code I am dealing with.
piece is a lumberPiece, and pieceAry is a array of 15 lumberPieces
Each time the add button is pressed, the current data is stored into the array, and then the pieceNum is incremented.
[code]...
I am using the media player control in my VB2010 project and hit a problem. I want to detect when a user has pressed the "next " button on the media player console.I can use the following code to detect the pause, play, fast forward, etc but I do not see anything that will detect when the "next" button is pressed.
[Code]...
I have put the DateTimePicker control on my Form and I have made it's CheckBox property to ture ,
Now I need to know is there any Event which is fired when the Check status of the checkbox in DateTimePicker is Changed.
I created a TabControl with 3 Pages. Like TabPage1, TabPage2 and TabPage3. How to check which page is active in tabcontrol? Using visual basic 2010.
View 4 Repliesam displaying some user names in treeview control, when i select a user i want to display in textbox, here when i select morethan one user i want to display in textbox like:user1 ;'user2;'user3;'user4;;and when i unselect any username i want to remove from textboxsuppose i uncheck user2 and user3 in treeview control i want to remove from textbox.
View 7 RepliesIs there anyway to check if a Control has been validated yet?I have some code that I want to run when the Selected of a TabControl fires off.The thing is, that I have TabPages added to the TabControl at the beginning of runtime, which then triggers the Selected event before the control is completely existent, which means the Sub I have that also happens to reference the control during that event errors out because there is technically not an instance of the control completely finished building so it says I don't have a correct reference set to that object.So basically, I want to be able to check in the Sub if the control has been Validated, or maybe even created or whatever is going on.
View 9 RepliesI need to Select and UnSelect all items in VB.NET CheckedListBox control, there is not any configuration to do it. Any script to acomplish this ?
[Code]...
I am trying to get the HTML inside a HTMLElement which has an id "block". I have tried:
If webbrowser1.document.getelementbyid("block") isnot nothing then
MsgBox(webbrowser1.document.getelementbyid("block").innerHTML)
end if
But it keep throwing a NullReferenceException and tells me to check if it null/nothing which is what I'm doing.
So how do I check if an element in a HTMLdocument with a certain ID exists?
Im working on a lay-away form application, this particular part is part of the even where the user adds a new customer, and has come to the section for adding personal references to the customers account. What Im trying to do is to check all the text boxes inside the GroupBox control, and then add all the tags of the text boxes that are empty to the list. If the list holds any records it will be put into a message box to let the user know he missed this value. But I want them to list in one text box. Here is what I've tried:[code...]
I get a conversion error, Cannot convert Prompt to String.
On coloring a chkbox fore color on load. (in a user control) if i check the checkbox the action happens but the chkbox does not appear to be "checked"
Private Sub ColorMainForm()
Me.BackColor = Color.FromArgb(30, 33, 42)
chkShouldShowLog.ForeColor = Color.FromArgb(225, 255, 255)
[Code]....
I'm looking for Version Control software that works with VS 2008 & allows multiple check-outs of a file, merging the changes as each version is checked back in. Obviously this would require manual resolution when two programmers changed the same procedure,but that rarely happens here-what usually happens is we have two (or more) programmers working on different parts of the program that happen to occur in the same file so only one of them can actually do their work at a time. Highly inefficient.
We're currently using Visual Source Safe, by the way. I 'inherited' this so I'm not *absolutely* certain it can't be configured for this, but if so none of the older programmers (in terms of time in this office) know about it. I think they used a home-grown program. Besides, I haven't been able to remember who I heard about it from so remembering that really isn't a help-at least not yet.
If DateTimePicker1.Value.Year <= DateTimePicker2.Value.Year Then 'dtp2 = expiry date
If DateTimePicker1.Value.Month <= DateTimePicker2.Value.Month Then
MsgBox("Expiry Date Correct!")
Else
MsgBox("Expiry Date incorrect!")
End If
End If
How would I get it to check the date? Datetimepicker1 is the current date, while Datetimepicker2 is the expiry date.
I use the following code in order to check if certin user exists in the DACL:
Dim l_managemantObject As ManagementBaseObject() = CType(securityDescriptor.Properties("DACL").Value, ManagementBaseObject())
For Each mObject As ManagementBaseObject In l_managemantObject
l_name = CType(mObject.GetPropertyValue("Trustee"), ManagementBaseObject).Properties("Name").Value.ToString
If CType(mObject.GetPropertyValue("Trustee"), ManagementBaseObject).Properties("Domain").Value IsNot Nothing Then
[Code]...
How does the CheckBox control draw that black check mark in the white box? I can't install .Net Reflector or anything here on my work machine so could someone post the code (vb.net or c# is fine with me)?
Or if anyone knows how to do it (I have an 8x8 Bitmap object I'm drawing on already) I'd like a hand since my math isn't working out correctly[code]...
I am writing a User Control. Into each control I am loading a custom biz object. Because the biz object implements IDataErrorInfo interface I am able to use the ErrorProvider control on the user control.
I am binding the ErrorProvider to the biz object like this:
Me.ErrorProvider1.DataSource=MyBizObject This is all working perfectly EXCEPT. The validation is happening (and therefore I am displaying the blinkey error signs next to all feilds) as soon as the User control is loaded into the host form.
Each biz object implements a SAVE method and I want the validate to not happen until the save event is triggered on the biz object.
Dealing with reading from an XML file, stuctured similar to the following:
[Code]...