Solved

Call Function Wtih Key Stroke

Posted on 2007-11-19
2
174 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
ID: 20312792
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
ID: 31409937
Solution was perfect
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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