Solved

I Have problem when I prass F10 , if I have combobox

Posted on 2008-06-10
2
335 Views
Last Modified: 2013-11-26
I used this code to save the data through pressing On F10



======================

    Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean
        Select Case keyData
            Case (Keys.F10)

              ' My save code

        End Select
        Return MyBase.ProcessDialogKey(keyData)

    End Function

===================


It's Ok saved
but if I have combo box in the form, it's will save two times

I made example for you

this is my code

note (don't forget put combobox in the form )

=======================

    Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean
        Select Case keyData
            Case (Keys.F10)

                MsgBox(" Save")
        End Select
        Return MyBase.ProcessDialogKey(keyData)

    End Function

=====================

It's will give you two messages
0
Comment
Question by:SystemSys
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 21760462
Return True when you get the F10 key:

    Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean
        Select Case keyData
            Case (Keys.F10)
 
              ' My save code
 
              Return True
 
        End Select
 
        Return MyBase.ProcessDialogKey(keyData)
    End Function

Open in new window

0
 

Author Closing Comment

by:SystemSys
ID: 31466037
Thaaaaaaaaaaaaaanks  Idle_Mind , That is OK
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question