ورود

View Full Version : چگونگی تشخیص کلید فشرده شده در Olecontrol ها



EBRAHIM_BANIHOSEINI
سه شنبه 07 آذر 1391, 10:34 صبح
با سلام! بعد از استفاده از Olecontrol ها چگونه میتوان تشخیص داد کاربر چه کلیدی را زده. میخواهم برای کلیدهای f1 تا f12 کد تعریف کنم. با تشکر

binyaz2003
جمعه 10 آذر 1391, 09:01 صبح
بصورت کلی برای تعریف کردن کلید های عملیاتی میتونید از دستور ON KEY LABEL استفاده کنید.

rezamim
چهارشنبه 15 آذر 1391, 10:51 صبح
من در KeyPress


*** ActiveX Control Event ***
LPARAMETERS keyascii
this.Parent.KeyPress(keyascii.Value)

و در KeyUp


*** ActiveX Control Event ***
LPARAMETERS keycode, shift

DO CASE
CASE KeyCode.Value = 112
this.Parent.KeyPress(28)
CASE KeyCode.Value = 113
this.Parent.KeyPress(-1)
CASE KeyCode.Value = 114
this.Parent.KeyPress(-2)
CASE KeyCode.Value = 115
this.Parent.KeyPress(-3)
CASE KeyCode.Value = 116
this.Parent.KeyPress(-4)
CASE KeyCode.Value = 117
this.Parent.KeyPress(-5)
CASE KeyCode.Value = 118
this.Parent.KeyPress(-6)
CASE KeyCode.Value = 119
this.Parent.KeyPress(-7)
CASE KeyCode.Value = 120
this.Parent.KeyPress(-8)
CASE KeyCode.Value = 121
this.Parent.KeyPress(-9)
CASE KeyCode.Value = 122
this.Parent.KeyPress(133)
CASE KeyCode.Value = 123
this.Parent.KeyPress(134)
ENDCASE



رو قرار ميدم! بعد در KeyPress فرم كليد فشار داده شده در حالي كه روي كنترل هستم قابل تشخيصه