How can I push a button virtual?
-
As the subject is saying, is it possible with C# to push a button like ENTER-key virtual? Just like with InvokeMember("click"), then I just need it to do a virtual push at ENTER-key.
-
As the subject is saying, is it possible with C# to push a button like ENTER-key virtual? Just like with InvokeMember("click"), then I just need it to do a virtual push at ENTER-key.
-
Thx a lot
-
As the subject is saying, is it possible with C# to push a button like ENTER-key virtual? Just like with InvokeMember("click"), then I just need it to do a virtual push at ENTER-key.
If you have code that does something other than handle speific UI elements in the Button Click handler, you really need to move that code to it's own method. Then you can call it from both the Button Click handler and from anywhere else in your code without having to resort to funky workarounds like this.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Hmm, and how can I then use it to make a push on Enter at my keyboard ? As I see that class, it only can perform clicks on buttons on the application. What I want is to make a program that for examples makes a virtual push on A,B,C,D,E,F,G on my keyboard
-
As the subject is saying, is it possible with C# to push a button like ENTER-key virtual? Just like with InvokeMember("click"), then I just need it to do a virtual push at ENTER-key.
Are you looking for SendKeys[^]?
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
Are you looking for SendKeys[^]?
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)Yes, I believe it is that I am looking for :)
-
As the subject is saying, is it possible with C# to push a button like ENTER-key virtual? Just like with InvokeMember("click"), then I just need it to do a virtual push at ENTER-key.
That works fine with SendKey, but it just requires that focus is on the application.. Which it isnt all the time.. Else it just does a Enter push while i am in another program.. Can I do so it does the ENTER in my application, and not in my current open program?