VB.Net 2003 FORM KEYDOWN problem

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: VB.Net 2003 FORM KEYDOWN problem

Threaded View

  1. #1
    Join Date
    Jan 2005
    New Zealand

    VB.Net 2003 FORM KEYDOWN problem

    Hi There,
    I am developing VB.NET 2003 window application having problem with the FORM KEYDOWN event.

    Problem with cancelling the keydown event when the data check function return FALSE due to duplicate Debtor ID.
    How to cancel the KeyDown ?
    Private Sub FrmDebtor_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
    	If e.KeyCode = Keys.Tab Or e.KeyCode = keys.Enter Then
    	        If Me.TabIndex = 1 Then
    	 	If FCheckDuplicate = True Then
    			e.KeyCode = Keys.Cancel
    		End If
    	       End If
    	End If	
    End sub
    Last edited by Hack; 12-22-2009 at 07:22 AM. Reason: Added Code Tags

Similar Threads

  1. Replies: 4
    Last Post: 05-21-2009, 09:36 PM
  2. AJAX form tag problem
    By kgarthai in forum AJAX
    Replies: 0
    Last Post: 02-19-2007, 08:31 PM
  3. Replies: 0
    Last Post: 12-11-2002, 05:05 AM
  4. Problem validating form NEED HELP
    By Steve in forum Web
    Replies: 1
    Last Post: 01-04-2002, 03:32 AM
  5. Form Problem In Netscape
    By Dan in forum Web
    Replies: 3
    Last Post: 11-23-2001, 04:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center