Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine Properties

Status
Not open for further replies.

windoz255

Technical User
Apr 8, 2003
17
GB
Hi,

I am trying to determine when a user clicks right clicks on an object to view it's properties.

If a user is VIEWING this information then I want my program to perform a certain task. Whereas if a user is RUNNING this program it will perform a different task.

Example:

When using notepad.exe

When a user right clicks on notepad.exe, the user views the properties of that object. The title caption will read e.g."notepad.exe properties".

But when a user runs notepad.exe the notepad title caption will be different.

How can I determine when a user is viewing an objects property, and then tell my program to perform a certain task if a property is being viewed.


Any information is appreciated.

Thanks,
Alan.
 
I don't find your question very clear. Do you mean when a user right clicks a file in Explorer and selects Properties from the context menu? If not, what are these objects the user can click?

If the former, I guess you would have to use a system-wide message hook. The hook itself can only be implemented in a DLL (not ActiveX) written in C++ or similar so you'll have to search the net for a suitable 3rd party library.

Once you have the DLL you can forward declare its functions in your project and listen for messages on their way to the properties window.

Paul Bent
Northwind IT Systems
 
>The hook itself can only be implemented in a DLL (not ActiveX) written in C++ or similar

Not quite true. A small number of system-wide hooks can indeed be implemented in VB. I've provided examples of at least two of these in the past (journalling, and an NT/W2k/XP/2003 global key hook)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top