Click here to Skip to main content
13,045,790 members (45,769 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I need to know the default action of double click or right click in excel?

I have used an Excel viewer in my C# Winform application. This viewer opens different .xls files with various number of sheets dynamically. I have to protect all sheets at the beginning of the application and also end of the sheetchange event handler.

Now I want to allow user to use some shortcut keys like {F1} or Ctrl+S. But none of the keys are working and I think this is because of the protection that I have applied on sheets. Am I right?

I have found that when i double click or right click on a cell all of the keys activated again! so it seems that the excel do what i need in background as its default double or right click action.

thanks in advance...
Posted 12-Mar-13 0:28am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could try to set focus to the component that holds this excel.
This might put excel in focus just like right clicking on it will do!

How to Set Focus to Any Form Control[^]
M_Mogharrabi 13-Mar-13 1:12am
Hi Abhinav S and thanks.I tested the following code but it had no effect :
Did you mean something like this?
Abhinav S 13-Mar-13 1:53am
Yup I did mean that. It did appear to be a control fcous issue.
Thanks for trying though.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 12 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100