quaizywabbit Posted February 23, 2005 Share Posted February 23, 2005 (edited) Just wondering if anybody has figured out how to tell when a File or folder is selected, and Right-clicked.......Trying to disable the Right-click menu just for a particular file or folder, showing a "Unauthorized!!" msgbox if they try to do anything with the file or folder. any help would be appreciated Edited February 23, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
bedazzled Posted February 24, 2005 Share Posted February 24, 2005 Attempting to find if an item(s) is selected in the left hand tree box... not completely worked this out, but if you have the staus bar switched on and parse the text of the first field of that (look at it with the info tool).... There are enough changes from the standard "[0-9][0-9]* objects" text when things are clicked on (enabled) or group selected to determine if things are actually "highlighted" use stringinstr or the regexp functions to parse the text disabling the right click menu is trickier.... registry may not do all of it is it possible to disable the mouse button itself at that point? _IsPressed doesnt help here... Link to comment Share on other sites More sharing options...
sPeziFisH Posted February 24, 2005 Share Posted February 24, 2005 you could do sth. like this (idea-code, don't want to write code)If _IsPressed('02') Then If ControlListView-GetItemCount <> 0 Then ... MouseClick-left in any corner, at the taskbar or whatever MessageBox ... EndIf EndIfezzetabi's _IsPressed-function Link to comment Share on other sites More sharing options...
sPeziFisH Posted February 24, 2005 Share Posted February 24, 2005 keep in mind that the right-click-menu is not the only way to do sth. with files, moving, deleting, renaming, show properties, etc. can also be done via hotkeys and explorer-menu, DOS is also fine for handling files. You should should limit the user-rights to certain folders, 'program files' is tabu etc. Link to comment Share on other sites More sharing options...
quaizywabbit Posted February 24, 2005 Author Share Posted February 24, 2005 Thanks for the advice......I know there's a lot more to securing a file/folder than I asked about..., Just looking for reasonably effective ways to keep the average user from altering a file, or folder contents. #NoTrayIcon While 1 WinWaitActive("Myapp") WinClose("MyApp") MsgBox(4096, "UnAuthorized!!!!", "No access allowed to this folder!!", 3) WEnd Simple as the above is, it wont let you open the folder, nor will Right-click "Properties" so being able to determine when the folder is selected(highlighted) and executing a command to interupt before the Right click menu appears would finish the job more than well enough for my purposes.. [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now