on 04-11-2013 9:00 AM
Hi All,
One of our customers discovered that by doing a copy Ctrl-C on a DW list, he can do a Paste on notepad and get all the contents of the DW list.
This could be a cool feature, if not for the unexpected problem that the list includes passwords and other information that users are not supposed to see.
I've tried capturing the ctrl-c on pbm_dwnkey, and then calling PeekMessageA, but this is not preventing the copy.
// Prevent Ctrl-C
blob{28} lblb_Msg
IF KeyDown(KeyShift!) AND KeyDown(KeyC!) THEN
PeekMessageA(lblb_Msg, 0, 256, 264, 1)
message.processed=TRUE
message.returnvalue=0
End If
Anybody run into this feature, and any ideas about how to overcome this?
We're on PB12.5.1 Build 4595 (though I don't think it's related to this version, as it also occurs on PB10.5)
Thanks.
Mick Hillel
Here is a link to my blog entry on clearing the clipboard.
You might set up the specific dw to trigger this.
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seems like the behaviour is PFC feature and not a general PB one.
I've been trying to capture the Ctrl-C in the pbm_dwnkey, but it seems that PFC is grabbing it before I can get my hands on it. I can capture the Ctrl, and I can capture the "c", but when I do both together, it's not triggering the event. So I haven't been able to clean the Clipboard because of that.
Chris, we have a pfc_m_master inherited menu on the window, and I tried to override the Copy there, that didn't seem to work. What did you have in mind when you said to add a new menu object for that DW .... a popupmenu ? In any case, not sure that it'll work if PFC is getting to the CTRL-C before I do.
Thanks all for your replies.
Mick.
Hi Mick;
FYI: Just add a menu or a new menu item to the existing menu object for that DW's dialogue - and assign the Ctrl-C short-cut to it. The new Ctrl+C menu item does not have to have any PowerScript code and will totally block the O/S's Ctrl+C functionality.
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may want to try KeyDown(KeyControl!) rather than "KeyShift!". Clipboard functions are also available to change/clear the copied stuff.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, that was a typo (KeyShift!) that I fixed previously, but that did not resolve the issue.
Clearing the Clipboard is an interesting idea, I tried this :
IF KeyDown(KeyControl!) AND KeyDown(KeyC!) Then
Clipboard("")
END IF
and couldn't get it to work. The clipboard is still copying all the List.
Thanks for your response.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.