How to trap keyboard events in mdi form... 
Author Message
 How to trap keyboard events in mdi form...

Hi all,

I use an ocx to build at run time menus with bmp ; it's running fine and now
I want to activate the CTRL+O, CTRL+S and so on.

When the MDI form has no MDIchild form, I need to know when CTRL+O... is
pressed. But there's no KeyPress event in MDIform.

I tried to subclass it, but no way trap keyboard event.

Any idea ?

Thanks in advance...

Best regards.

Christian Hugoud



Mon, 13 Oct 2003 15:12:35 GMT  
 How to trap keyboard events in mdi form...
Have you tried using the

Public Declare Function GetKeyboardState Lib "user32" Alias
"GetKeyboardState" (pbKeyState As Byte) As Long
or
Public Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal
nVirtKey As Long) As Integer
cant remember to be honest

Quote:
> Hi all,

> I use an ocx to build at run time menus with bmp ; it's running fine and
now
> I want to activate the CTRL+O, CTRL+S and so on.

> When the MDI form has no MDIchild form, I need to know when CTRL+O... is
> pressed. But there's no KeyPress event in MDIform.

> I tried to subclass it, but no way trap keyboard event.

> Any idea ?

> Thanks in advance...

> Best regards.

> Christian Hugoud




Mon, 13 Oct 2003 17:06:10 GMT  
 How to trap keyboard events in mdi form...
Thanks George,

The problem is to know WHEN a key is down ; then, I can use these APIs.

Best regards.

Christian Hugoud



Quote:
> Have you tried using the

> Public Declare Function GetKeyboardState Lib "user32" Alias
> "GetKeyboardState" (pbKeyState As Byte) As Long
> or
> Public Declare Function GetKeyState Lib "user32" Alias "GetKeyState"
(ByVal
> nVirtKey As Long) As Integer
> cant remember to be honest


> > Hi all,

> > I use an ocx to build at run time menus with bmp ; it's running fine and
> now
> > I want to activate the CTRL+O, CTRL+S and so on.

> > When the MDI form has no MDIchild form, I need to know when CTRL+O... is
> > pressed. But there's no KeyPress event in MDIform.

> > I tried to subclass it, but no way trap keyboard event.

> > Any idea ?

> > Thanks in advance...

> > Best regards.

> > Christian Hugoud




Mon, 13 Oct 2003 17:32:37 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Keyboard events in MDI forms ...

2. Why does SS Tab trap key events before the form traps them

3. MDI Form - How can I disable keyboard child form switching

4. Using hooks to trap ANY mouse/keyboard event

5. Trapping keyboard events from other programs...

6. Trap keyboard events to ole container on windows 98

7. Keyboard Event Trapping

8. msgrid.ocx - Keyboard event trapping

9. Need to trap Keyboard event...

10. Trapping Keyboard and Mouse Events...

11. Proccessing Keyboard and the like in MDI form

12. making a mdi form a form during run time with click event

 

 
Powered by phpBB® Forum Software