access������--
ËùÊô·ÖÀࣺ ¾­Ñé·ÖÏí ×÷Õߣº ÀîÑ°»¶ ¸üÐÂÈÕÆÚ£º2003-10-17 18:54:45 ÔĶÁ´ÎÊý£º195

ÈçºÎ×Ô¶¨ÒåÈý¸ö¼üµÄ×éºÏ¼ü


ÀûÓÃKeyDownʼþ£¬ÎÒÃǺÜÇáÒ׵ؾͿÉÒÔ±à³öÈóÌÐòÏìÓ¦Á½¸ö°´¼üµÄ×éºÏ¼üµÄʼþ£¬È磺

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
if Shift=1 and KeyCode=VbKeyM then
msgbox "Äú°´ÏÂÁËShift+M¼ü"
end if
end sub

Èç¹ûÒªÈóÌÐòÏìÓ¦Èý¸ö¼üµÄ×éºÏ¼ü¾ÍÒªÂé·³Ò»µã£¬±ÈÈçÏÖÔÚÒªÓÃshift+b+m´ò¿ª"²¿ÃÅ"´°Ìå¡£
Ê×ÏÈÒªÉùÃ÷Á½¸ö´°Ì弶±äÁ¿mSta/bSta±£´æM¼°B¼üµÄ°´¼ü״̬£¬È»ºóÔÚ´°ÌåµÄLoadʼþÀïÉèÖÃKeyPreview(¼üÔ¤ÀÀ)ΪTrue£¬ÒԱ㴰ÌåÏÈÓڿؼþ½ÓÊÕ¼üÅÌʼþ¡£
ÔÚKeyDownʼþÀïÅжϰ´¼ü£¬Èç¹û°´ÏÂM»òB£¬¾Í°ÑmSta»òbStaÖÃΪTrue¡£
ÔÚKeyUpʼþÀïÅжϰ´¼ü£¬Èç¹û·Å¿ªM»òB£¬¾Í°ÑmSta»òbStaÖÃΪfalse¡£
×öÍêÕâЩʺó¾Í¿ÉÒÔÔÚKeyDownʼþÀïÅжÏÊÇ·ñ°´ÏÂÁËShift+M+B¼üÁË£¬´úÂêÈçÏ£º
Dim mSta As Boolean
Dim bSta As Boolean

Private Sub Form_Load()
Me.KeyPreview = True
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyM Then
mSta = True
End If
If KeyCode = vbKeyb Then
bSta = True
End If
If Shift = 1 And mSta = True And bSta = True Then
DoCmd.OpenForm "²¿ÃÅ"
mSta = False
bSta = False
End If
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyM Then
mSta = False
End If
If KeyCode = vbKeyB Then
bSta = False
End If
End Sub



--------------------------------------------------------------------------------
Ïà¹ØÎÄÕÂ

ûÓÐÏà¹ØÎÄÕÂ


ϵͳÓÅ»¯
¿Ø¼þʹÓÃ
Êý¾Ý¿âÉè¼Æ
Êý¾Ý¿âÁ¬½Ó
ϵͳ°²È«
OLE×Ô¶¯»¯
³£¼ûÎÊÌâ
ʵÓôúÂë
ÊôÐÔÏê½â
ÍøÂçÏà¹Ø
ʵÓÃAPI
¾­Ñé·ÖÏí
¾«Ñ¡½Ì³Ì
×Ö·û´¦Àí
ADPÏà¹Ø



ÎÄÕÂËÑË÷



ÖÆ×÷ά»¤£ºÀîÑ°»¶     Mail:[email protected]

¹ØÓÚ±¾Õ¾ -- ÍøÕ¾·þÎñ -- °æȨÌõ¿î -- ÁªÏµ·½·¨ -- ÍøÕ¾°ïÖú
access°®ºãõß°æȨËùÓÐ Copyright 2003-2005 All Rights Reserved δ¾­Ðí¿É²»µÃµÁÁ´