Solved

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

Posted on 2008-06-10
2
338 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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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