Relation between "KeyPress" and form focus (Vb.Net)

  • Thread starter Thread starter Zvi
  • Start date Start date
Z

Zvi

Hi!

I have a form in an application that's being used for some workers at a
call center, that has a small UI. It's just a clock so users on calls
can see how long they have been on a call.

I want to make Keyboard shortcuts for the application. The problem is
that of course, whle the user is using his other software and the clock
is showing in a small form on the screen, it doesn't have focus and
"KeyPress" or "KeyDown" doesn't have any effect.

I can't use Hooks because the security level of the Network won't allow
me to.

How can I accomplish this?

Thanks!
 
Hi,

It would have been more appropriate to ask this question in the WinForms
group, but not csharp. This is especially true if you were expecting VB.NET
code samples.
I have a form in an application that's being used for some workers at a
call center, that has a small UI. It's just a clock so users on calls
can see how long they have been on a call.

I want to make Keyboard shortcuts for the application. The problem is
that of course, whle the user is using his other software and the clock
is showing in a small form on the screen, it doesn't have focus and
"KeyPress" or "KeyDown" doesn't have any effect.

I can't use Hooks because the security level of the Network won't allow
me to.

How can I accomplish this?

And what if the user wants the keys that are pressed to be sent to the focused
application and not yours?

Windows users are accustomed to focusing a window before it receives input.
If the applications need to work together, they should be aggregated into a
single application.

Since your application doesn't have permission to use P/Invoke I don't think
you have any choice.
 
Dave,

You know that the VB counterpart from this newsgroup has the same name as
this one with the difference where csharp is written it is vb.

microsoft.public.dotnet.languages.vb

It is almost as busy as this newsgroup (not complete), although in avarage
the threads are less long.

:-)

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top