View previous topic :: View next topic |
Author |
Message |
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sun Jul 27, 2003 7:39 am Post subject: vdsobj02.dll feature request |
|
|
hi pgware,
would you be able to add to richedit the ability to not have the text it contains to be selected by mouse control or keyboard shortcuts? i need for the information in the richedit element not to be able to be copied (for copyright reasons)...does that make sense? the currend readonly option means that users can't edit the text in the richedit element but they can still select it and copy it to the clipboard...this i need to stop
also, could you make it so that it supports subscripts and superscripts?
thanks in advance
serge _________________
|
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Sun Jul 27, 2003 4:43 pm Post subject: |
|
|
vdsobj update: DOWNLOAD HERE
Serge I added the subscript and superscript styles in now. Also the function GETFORMAT has new values of P and E which return if subscript and superscript are on/off for any text selected.
As to your question about disabling copying, the best solution I could come up with is doing this:
First set the richedit object on creation with two styles:
READONLY, CHANGE
Then add the event label :RICHEDIT1ONCHANGE and put this code below it:
OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,0,0
That code will keep putting the cursor position back to position 0,0 anytime the richedit's text area is clicked on and wont allow any selection/copying. |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jul 27, 2003 9:46 pm Post subject: |
|
|
Please remember that tools, such as Window Spy, probably still will be able to obtain
the richedit's contents. |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Jul 28, 2003 1:54 am Post subject: |
|
|
True but one can probably give atleast a basic protecton by preventing running them when your app is running. I don't know if am permitted to discuss the details of it but U can do it(simple). But still a small flaw that the person can use a script designed in vds itself which is difficult to detect.
But I think should still gives a fair degree of protection unless your users are programmers.
If you have a limited content which should not be copied put it as a graphic and include it as a resource.
Edit:
One more idea If you are on VDS 5 assiign Ctrl+C to a hotkey and send to a fake label which esends it back to your EVLOOP so your key press(ctrl+C) is trapped.
You may add remove hotkey on minimse and add it on restore or (advanced - detect if the window is not foreground - enable if foreground disable the fake hotkey - use API for detecting window z order) - this makes your app a good window citizen and not disable copy in other apps.
You might also "empty clipboard" i.e clipboard clear at the hotkey label for Ctrl+C.
Sorry for the long unorganised reply.
Hope it helps a little
Regards _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Mon Jul 28, 2003 8:57 am Post subject: |
|
|
thanks pgware for the update and for your idea...i will check it out...another possible way would be to use :TIMER and to continually clear the clipboard...but i thought that there might be an easier way
thanks tommy and codescript for your thoughts too...i am not using vds 5 otherwise your shortcut idea would be good
serge _________________
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jul 28, 2003 2:29 pm Post subject: |
|
|
Serge wrote: | i am not using vds 5 otherwise your shortcut idea would be good |
You could always use Tommy's VDSHOT.DLL in the VDSPACK to create
a hotkey in applications under VDS 5.x _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Jul 29, 2003 12:40 pm Post subject: |
|
|
thanks for all your ideas guys...pgware, your idea works great...as does the subscript and superscript...thanks for the update
serge _________________
|
|
Back to top |
|
|
|