Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-06-10
2
Medium Priority
?
343 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

609 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