PdoxRT10 - WinXP sp3 - Excel 2003 or 2010
Hello - I'm trying to block the use of the ctrl key to prevent the user from copying/pasting data into a field in Paradox.
The problem is when they copy/paste (from EXCEL) into the Pdox field, you do not "see" what was just pasted unless you click into the field and "arrow" to the left OR click on a different field on that form (then the text appears).
This is causing the user to paste into the field twice, then they can see the text. They move on with their working like normal, but the data posted into the table is not right. In the table, I see the orginal pasted data, then a couple of "squares" (returns characters or seomthing?) and then I see the data again, which should only be in the field one time, without any weird symbols in the mix.
To compound the problem, we have a routine that exports data from a table into Excel. When the data that I spoke of above is exported, it exports nothing, or "blank" data into Excel. Other fields on the same record export fine. The only data not exported in this process is the data that has been pasted twice, and with the funky square characters.
To correct this, I am trying to block access to the ctrl key on the form that is being used when the user copies/pastes, but I cannot seem to get it to work. Here is what I've tried on the form level/keyPhysical event:
method keyPhysical(var eventInfo KeyEvent)
if eventInfo.isPreFilter() then
;// This code executes for each object on the form
switch
case eventInfo.vCharCode() = VK_F1 : disableDefault
case eventInfo.vCharCode() = VK_F9 : disableDefault
case eventInfo.vCharCode() = VK_HOME : disableDefault
case eventInfo.vCharCode() = VK_END : disableDefault
case eventInfo.vCharCode() = VK_INSERT : disableDefault
case eventInfo.vCharCode() = VK_ESCAPE : disableDefault
case eventInfo.vCharCode() = VK_NEXT : disableDefault
case eventInfo.vCharCode() = VK_PRIOR : disableDefault
case eventInfo.vCharCode() = VK_PAUSE : disableDefault
case eventInfo.vCharCode() = VK_RBUTTON : disableDefault
case eventInfo.vCharCode() = VK_CONTROL : disableDefault
endswitch
else
;// This code executes only for the form
endIf
endMethod
I've also tried this on the fields themselves, but I am STILL able to do CTRL V and paste data into the fields.
Thanks in advance!
-Shawn