1

I'm trying to send a '%' sign to my textbox through the SendKeys.Send() method.

I already know that you should enclose the '%' by braces.

This command should be correct :

 SendKeys.Send("{%}");

But I get a '5' instead of a '%' in my textbox.

I tried this on VS.Net 2010/2012 and 2015, all with the same result.

PS : My regional settings/keyboard are 'NL-be' in case this matters.

leppie
  • 115,091
  • 17
  • 196
  • 297

2 Answers2

1

According to MSDN: https://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=vs.110).aspx

The character represents a key code on the keyboard, you should combine it with SHIFT.

So try SendKeys.Send("+5");

"+" Represents the SHIFT key.

OrMiz
  • 265
  • 2
  • 11
0

I found a solution that works in this post https://stackoverflow.com/a/59251988/4634377

You must call Send with '+' which is code for SHIFT and then 'ù':

SendKeys.Send("+ù");
SELLAM
  • 71
  • 1
  • 4