Just in case someone else runs up against the same problem, I found the culprit: I had a ToolStripMenuItem on the form with its ShortcutKeys set to Ctrl+V and it was obviously conflicting. I set the ToolStripMenuItem ShortcutKeys to 'none' and left the ShortcutKeyDisplayString as '(Ctrl+V)'...
No, ReadOnly is set to False.
I've checked every property on my original form against the newly added (test) form, then did the same for the textbox on each form. They are identical. The new form works perfectly well, the original does not (even when I add a new textbox to it).
I'm just...
Ah, forgive me, I understand now your point now about Alt.
The problem does indeed seem to be a fault or setting with the Form I'm working on. I've just added a new form to the project with just a textbox on it and no added code. When I run this and just use the normal windows Ctrl+V in the...
First of all, thanks for your reply.
I've tried your code(s) but none of them will work for me, regardless of whether or not the Form KeyPreview property is set to True or False, or whether or not the TextBox ShortcutsEnabled property is set to True or False (in any of the four potential...
Update: The following code works with pretty much any key other than X, C, V (the cut, copy & paste keys I'm trying to use!)
If e.KeyCode = Keys.A AndAlso (e.Control) Then
If Clipboard.ContainsText Then
If Me.Text_Convert.Text = "0" Then
Me.Text_Convert.Text =...
Hi
I'm having trouble pasting text into a textbox by trapping the Control + V Keys in the textbox KeyDown event. KeyPreview for the form is set to True.
I've tried the following methods in the textbox keydown but neither works:
If e.KeyCode = Keys.V AndAlso e.Modifiers = Keys.Control Then...
Sorted. Thank you.
Perhaps worth noting that, even though Enable XP visual styles is checked you, unsurprisingly, get Windows 10 styles (e.g., Flat Buttons). Added bonus.
Your help is greatly appreciated.
Chris M
I've been looking the high DPI Support you mentioned but I'm having some bother with it. The Microsoft Doc 'Configuring your Windows Forms app for high DPI support' says to Declare Compatibility with Windows 10 with the following xml in the Manifest File:
<compatibility...
Had a look and it does solve the settings problem. Unfortunately it also reintroduces the HD Display problem, so I will just check once or month or so for updates.
Thanks again for your help,
Chris M
Thanks for looking at this JohnH, I really appreciate it.
I tried to add a new settings.settings file, as suggested and it worked up to a point: the file was created and I added new setting but it throws an error (possible corrupt xml as above) and the code referencing it causes an exception...
Hi
I'm using Visual Studio Community 2019 on Windows 10 and I'm having a major problem with Form Settings (in My Project window). It's telling me to 'click here' to create a settings file and doing so throws the following exception:
The system cannot find the file specified. (Exception from...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.