Sign in to follow this  
jagguy2

process keys

Recommended Posts

For the line in this code in this vb.net example Return MyBase.ProcessCmdKey(msg, keyData) 'what does this mean when you return paramaters that you have been passed. It doesnt seem to do anything? Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean Select Case keyData Case Keys.Up pb3.Top -= 10 Case Keys.Down pb3.Top += 10 Case Keys.Left pb3.Left -= 10 Case Keys.Right pb3.Left += 10 End Select Return MyBase.ProcessCmdKey(msg, keyData) 'what does this mean ? End Function [Edited by - jagguy2 on July 26, 2008 11:49:02 PM]

Share this post


Link to post
Share on other sites
MyBase.ProcessCmdKey returns a value. Saying 'Return MyBase.ProcessCmdKey' means you are returning what ProcessCmdKey returned. Because this method overrides...MyBase.PrcoessCmdKey is calling the original method before its overridden.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this