[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2008-06-10
2
Medium Priority
?
344 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 86

Accepted Solution

by:
Mike Tomlinson earned 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

831 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