• 0

[VB.NET - HELP] Sending Numpad Key


Question

2 answers to this question

Recommended Posts

  • 0
4 hours ago, Lirbo said:

Hey everybody!

 

I faced some issues when I tried to send a numpad key.

SendKeys.Send({Numpad0}) doesn't work.

The parameter is a string. String literals in VB.NET are delimited by double-quotes, as in the Hello World example:

Console.WriteLine("Hello World!")

Therefore your code should be:

SendKeys.Send("{Numpad0}") 

By the way, your code didn't just "not work", it didn't "compile" and if you were working in Visual Studio, you had errors telling you something useful about why. Make sure to include this information in any question you ask about why your code "doesn't work".

 

Sans titre.png

  • Like 1
This topic is now closed to further replies.