.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to enable Ctrl+C, Ctrl+V, Ctrl+X in a text box?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :Windows Application



I've already set the ShortcutsEnabled property to true but still cannot use keyboard shortcuts to do "copy", "cut", "paste" ,"select all", "undo" , "redo", etc.

Did I miss anything?


Thanks in advance

ps. i'm using VC#

View Complete Post

More Related Resource Links

how to find any text in current page with java script like (CTRL + F) ie or firefox .



i have a page with datalist and more label

and i have an input text and a html button in my page.

i need a javaScript code for find text in my page like ( ctrl + f ) in ie or firefox . ?!


Sending 'ctrl-c' to the datagridview row of an external application using win32 api. Please help.

I'm just not able to send ctrl-c using my C# application to an external WinForm application. Here is my sequence of commands. I compared the messages using Spy++, and it matches except for my SendMessages are showing up as Send and Receive, vs. the same operation done on the WinForm is showing up as posted. My command sequence : NativeMethods.SendMessage(hwnd, WM_KEYDOWN, 0x00000011, 0x001D0001); NativeMethods.SendMessage(hwnd, WM_KEYDOWN, 0x00000043, 0x002E0001); NativeMethods.SendMessage(hwnd, WM_CHAR, 0x00000003, 0x002E0001); NativeMethods.SendMessage(hwnd, WM_KEYUP, 0x00000043, 0xC02E0001); NativeMethods.SendMessage(hwnd, WM_KEYUP, 0x00000011, 0xC01D0001); My Spy++ sequence : <00001> 0059043C S WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPos:299 yPos:52 [wParam:00000001 lParam:0034012B] <00002> 0059043C R WM_LBUTTONDOWN <00003> 0059043C S WM_LBUTTONUP fwKeys:MK_LBUTTON xPos:299 yPos:52 [wParam:00000001 lParam:0034012B] <00004> 0059043C R WM_LBUTTONUP <00005> 0059043C S WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:0 fUp:0 [wParam:00000011 lParam:001D0001] <00006> 0059043C R WM_KEYDOWN <00007> 0059043C S WM_KEYDOWN nVirtKey:'C' cRepeat:1 ScanCode:2E fExtended:0 fAltDown:0 fRepeat:0 fUp:0 [wParam:00000043 lParam:002E0001] <00008> 0059043C R WM_KEYDOWN <00009> 00590

Handling Ctrl + Shift + Click on Button control

Hi All, I have to Button control in my Windows form. I have to handle 2 types of click events on this button. 1. Ctrl + Shift + Click //Allow the user to do some special task. 2. Click //Allow the user to perform normal task only. How could I handle Ctrl + Shift + Click ? Please help me out.

MediaElement - Video freeze after Ctrl+Alt+Delete is pressed



Why do my video frozen when I do Ctrl+alt+delete and go back to the WPF application? Any idea?

string videoSource = "somevideofile";
MediaElement HomePageVideo;

void init()
  HomePageVideo.Source = new System.Uri(videoSource);

  HomePageGrid.IsEnabled = true;
  HomePageGrid.IsHitTestVisible = true;
  HomePageGrid.Opacity = 1;
  HomePageGrid.Visibility = Visibility.Visible;


void play()
   HomePageVideo.Position = new TimeSpan(0, 0, 18);

<Grid Name="HomePageGrid" Visibility="Hidden" Background="Black" Opacity="0">
  <MediaElement Name="HomePageVideo" Width="1280" Height="720" LoadedBehavior=

VS2010 What happened to ctrl-V !! Ever since moving to VS2010 Copy / Paste functions are not workin


It is hit and miss and mostly miss when I atempt to cut and paste code from one place to another. Please help! I will use CTRL-V after cutting some code to paste it and it does nothing but move the currsor to the beginning of the line. I thought perhaps I had accedently changed the shortcut setting, but a revue of tools\options\keyboard\shortcuts verifed that CTRL-V should be pasting. I am sure you can imagine how debilitating this can be. I hope someone knows what is going on as I can find no information anywhere about it.


Ctrl + A not working


Hi everyone,


I wrote an application very similar to Notepad ++, however my application has some industry specific uses. The application works perfectly for all my clients, except for one client based in Denmark. He's running a Danish version of Windows 7 and the preinstalled .NET Frameword 3.5

When he opens my text editor and presses the Ctrl + A, it should select all the text, but it does nothing. I also built in some syntax checking, but this also fails with the letter A. I've changed all the string.Compare(string A, string B) functions to string.Compare(string A, string B, true, CultureInfo.InvariantCulture) This seemed to have solved some problems, but not the Ctrl + A function. 

This shortcut is added to a button under the button's properties, so therefore I don't have any globalization control over it. Can anyone maybe shed some light, firstly as to why a Danish language pack or Danish regional settings can interfere so drastically, and how can I fix the Ctrl + A functionality.


Disposing when hower AND CTRL is activated AND left mouse button is pressed ????


I want to let the user get rid of some designelements (PictureBoxes) on a form very fast.

This code can do it IF the user holds down the CTRL-key AND moves the mouse cursor over the designelements.

    private void signal_MouseHover(object sender, EventArgs e)
      Cursor.Current = Cursors.Hand;
      if (commonThings.ctrlActivated)

I have two problems witch I can't solve:

1) I want to secure wrong deleting of designelements by ALSO test that the LEFT-mouse key is pressed togather with CTRL (there is no "buttons" with the e !)

2) the Hover-event is a little delayed, so the deleting is in fact a little slow

How can this be done ?


Best regards KSor, Denmark

Anyone know of any plugins/addins to allow Ctrl + F to work in the Workflow Designer?



It was suggested I post in this forum regarding my quandary re: navigating large workflows from the GUI:


It appears that Ctrl+F is not supported in the Workflow Designer out of the box; just wanted to know if anyone is aware of any VS plugins, addons, or tricks that could quickly let us jump to the desired section of the workflow without constantly working in Expand All mode or memorizing Sequence names (the latter of which seems to be the inevitable as we make our customizations more complex).

Thanks much!


Enable Full Text Index in VWD 2008 / SQL Server Express 2008


 Hi, I am using VWD 2008 Express and SQL Server 2008 Express. I want to enable full text index in some of my table. How do I do that? I only have  SQL Server Management Studio Express 2008. As far as I know, I cannot use SQL Server Management Studio Express 2008 to update the full text catalog according to : http://msdn.microsoft.com/en-us/library/ms365247.aspx

My tables are also not enable Full Text Search by default. 


 Any help would be very much appreciated!

 Edit 1: Someone had a similar problem to mine on this link: http://forums.asp.net/t/1169961.aspx
I installed the Sql Server 2008 Express with Advance Services and made sure that Full Text functionality is installed. However I don't get a full text menu in SQL Server Management Studio. 

 Edit 2: I uninstall and reinstall SQL Server 2008 Express with Advance Services but still couldn't be able to enable full text index.

 Edit 3: After see this, I guess I have to do it manually then:  http://forums.microsoft.com/MSDN/ShowPost.aspx?siteid=1&PostID=3912985

How Do I Enable Inline GridView Editing?

Now that you have created a site with Edit and Details views, how do you enable inline editing in a GridView control? This video shows you how, and also touches on routing.

AutoCompleteStringCollection for text box in DataGridView 2.0

I have been searching for a way to have autocomplete in a DataGridTextBox
object. There does not appear to be an obvious way to do this like you would
for a TextBox outside of a grid using the AutoCompleteCustomSource. Any
thoughts on how I can add this collection? :)

Built-in Functions - Text and Image Functions in SQL Server

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.

Built-in Functions - Text and Image Functions

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Conversion of text files from ANSI to UTF-8

reading and writing text files in ANSI format and
writing html-files in Charset ISO-8859-1 (Western Europe).

Text to Voice

Text to Voice and Voice to Text convert

Voice to Text conversion:-

Gridview Enable Selection Problem



I have a gridview with Enable selection and Enable Paging equals to TRUE.

I also set the PageSize of my gridview to 4 so that I only displays 4 rows per page.

The problem is when I click the pager in the bottom of my gridview, my gridview is disappearing and no records appear.

Here is code behind of my gridview:

If e.Row.RowType = DataControlRowType.DataRow Then
                e.Row.Attributes("style") = "cursor:pointer"

                e.Row.Cells(2).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(3).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(4).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(5).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
                e.Row.Cells(6).Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend