مشاهده نسخه کامل
: ایا این کار امکان پذیر هست؟!
سلام دوستان
می خواستم بدونم ایا امکان داره که بشه قابلیت راست کلیک (right click) موس رو توی textbox غیر فعال کرد؟
aaaammmm87
11-01-2009, 21:23
سلام
از شدن كه شدني هست
اين كد زير رو يه امتحاني بكن ببينم (خودم كه با خطا مواجه شدم ؟)
private declare function lockwindowupdate lib "user32" (byval hwndlock as long) as long
private sub mnuone_click()
text1.text = "menu one was clicked"
end sub
private sub mnutwo_click()
text1.text = "menu two was clicked"
end sub
private sub text1_mousedown(button as integer, shift as integer, _
x as single, y as single)
if button = vbrightbutton then
' avoid the 'disabled' gray text by locking updates
lockwindowupdate text1.hwnd
' a disabled textbox will not display a context menu
text1.enabled = false
' give the previous line time to complete
doevents
' display our own context menu
popupmenu mnupopup
' enable the control again
text1.enabled = true
' unlock updates
lockwindowupdate 0&
end if
end sub
سلام
خیلی ممنون اما نخیر متاسفانه کار نکرد.من فقط می خوام راست کلیک موس غیر فعال بشه همین.
vBulletin , Copyright ©2000-2025, Jelsoft Enterprises Ltd.