@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
474 2 รบกวนสอบถามเรื่องการdisable คำสั่งครับ
ถ้าผมต้องการ disable คำสั่งตามรูป สามารถทำได้ป่าวครับ พอดีไม่อยากให้พนักงาน
ใช้คำสั่งนี้ครับ
ใช้คำสั่งนี้ครับ

2 Reply in this Topic. Dispaly 1 pages and you are on page number 1
2 @R24426
ขอบคุณครับ เดี๋ยวผมจะลองดูครับ
Time: 1.7561s
แต่ผู้ใช้ยังสามารถใช้ Ctrl+C, Ctrl+V ได้ ต้องกำหนดเพิ่มเติมอีกคืิอ
1. ที่ Form Properties > Tab: Events > Key Preview = Yes
2. ที่ Form Properties > Tab: Events > Key Down
ให้ใส่ Code นี้เข้าไป (ถ้าจะป้องกัน Ctrl+X ก็เขียน Code เพิ่มอีกนิดเอานะครับ)
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim intCtrlDown As Integer
intCtrlDown = (Shift And acCtrlMask) > 0
If KeyCode = vbKeyV Then
If intCtrlDown Then
MsgBox "You Pressed Ctl + V"
KeyCode = 0
End If
End If
If KeyCode = vbKeyC Then
If intCtrlDown Then
MsgBox "You Pressed Ctl + C"
KeyCode = 0
End If
End If
End Sub