thirteentwenty
Well-known member
I've been using this bit of code to handle keydown events for different controls (in this case a textbox) that need them
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I've got a couple of questions about it....
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
* note: this is from a test project that I keep handy to experiment with so please don't mind the naming convention...
	
		
			
		
		
	
				
			
			
				VB.NET:
			
		
		
		Private Sub TextBox1_KeyDown(ByVal eventsender As System.Object, ByVal eventargs As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
    Dim KeyCode As Short = eventargs.KeyCode
    ' Dim Shift As Short = eventargs.KeyData \ &H10000 ' figure this out later
    If KeyCode = 13 Then
        ' Do something
    End If
End SubI've got a couple of questions about it....
- Is this a good way to do this, or is there a better way to do this
- what does the below line (in code it has been commented out) mean/do?
			
				VB.NET:
			
		
		
		Dim Shift As Short = eventargs.KeyData \ &H10000 ' figure this out later* note: this is from a test project that I keep handy to experiment with so please don't mind the naming convention...
 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		