Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with sendkeys VS2005 1

Status
Not open for further replies.

zarkon4

MIS
Dec 16, 2003
641
US
I amd trying to code the following.

System.Windows.Forms.SendKeys.Send(Keys.Enter)

I get a message that SendKeys is not a member of 'Forms'

I am developing a mobile application and according to the documentation it should exist for the compact framework.

I'm a newbie, what am I doing wrong?
 
You can send it as
System.Windows.Forms.SendKeys.Send("{ENTER}").

HTH.

Vinodi


~~The only place where SUCCESS comes before WORK is in the dictionary~~
 
It does not work, I get a message (in the dev window) that SendKeys is not a member of Forms.
I thought that this should be available in the .Net Compact Framework but maybe I am wrong.
 
Maybe I am not making myself clear. I know how to code it. The dev environment will NOT ACCEPT it as a command.
The message is...

"SendKeys is not a member of Forms" when I use system.windows.forms.sendkeys

The message I get when I use just SendKeys.Send is
"SendKeys is not declared.

So allow me to change the wording of my question:

Is SendKeys available in the .Net 2.0 Compact Framework?

If so, then why is it not working?
 
Great, one other question, How do I use it from within VB?
 
The easy way:

Create a new C# class library project. Delete the class1.cs file and insert that. Compile it - DLL.

Add an import statement to you VB project like:
Imports r = OpenNETCF.Windows.Forms.SendKeys

Then use it: r.Send("enter")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top