Solved

Call Function Wtih Key Stroke

Posted on 2007-11-19
2
172 Views
Last Modified: 2010-04-21
I have a function on my WinForm that basically just loads a DataGrid.

I want the user to be able to hit the F5 button to refresh the grid if they want.  IS this possible?
0
Comment
Question by:chrisryhal
2 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
Comment Utility
On KeyDown or KeyUp event you can do:

If e.KeyCode = Keys.F5 Then
  ' your code
End If

Don't forget to set the form property KeyPreview = True

jpaulino
0
 
LVL 2

Author Closing Comment

by:chrisryhal
Comment Utility
Solution was perfect
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now