6 Replies - 13338 Views - Last Post: 24 August 2008 - 12:20 PM Rate Topic: -----

#1 Mommy  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 137
  • Joined: 04-August 08

Simulate enter/return key press?

Posted 24 August 2008 - 04:33 AM

The topic kinda says it all.. How to simulate enter/return key press?
I've googled it, but I weren't able to find anything..

SendKeys.Send doesn't work for this..
Is This A Good Question/Topic? 0
  • +

Replies To: Simulate enter/return key press?

#2 Mommy  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 137
  • Joined: 04-August 08

Re: Simulate enter/return key press?

Posted 24 August 2008 - 11:27 AM

bump. Someone must know how to do this? :s
Was This Post Helpful? 0
  • +
  • -

#3 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Simulate enter/return key press?

Posted 24 August 2008 - 11:35 AM

Make sure you put this in the KeyDown() event
If e.KeyCode = Keys.Enter Then
		'TODO CODE
End If


Was This Post Helpful? 0
  • +
  • -

#4 Mommy  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 137
  • Joined: 04-August 08

Re: Simulate enter/return key press?

Posted 24 August 2008 - 11:41 AM

Think you misunderstood me.. I don't want something to happen WHEN a user clicks enter, I want it to click enter when the program tells it to
Was This Post Helpful? 0
  • +
  • -

#5 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Simulate enter/return key press?

Posted 24 August 2008 - 12:06 PM

Well instead of trying to simulate it why don't you just pass the code instead of trying to simulate. I think it will do the same thing.

If I'm not right can you please re-explain.
Was This Post Helpful? 0
  • +
  • -

#6 Mommy  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 137
  • Joined: 04-August 08

Re: Simulate enter/return key press?

Posted 24 August 2008 - 12:18 PM

The problem is, that I need to simulate it, to close an inevitable message box.
Was This Post Helpful? 0
  • +
  • -

#7 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Simulate enter/return key press?

Posted 24 August 2008 - 12:20 PM

Why are you trying to show a MessageBox then Close it?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1