Click here to Skip to main content
16,006,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi firends i want to find a path of file which my mouse over it..
windows shows information about file when u go on it..i want it path..if cant which file clicked it can be.
What i m tryign to do ;
i used before linux for short when i was using it i saw a when u come over file it shows priew about it so i would like to do same for windows 7 but i codunt get file path when mouse over it need help thx for ur read..
Posted

Play around with Spy++[^].

You could implement a global message hook, Spy++ can help you determine what to look for - Windows class, messages to monitor and so on.

The shell API provides many notifications:
http://msdn.microsoft.com/en-us/library/bb774198(v=vs.85).aspx[^] - some which nearly fits the bill - like SFVM_GETTOOLTIPTEXT.

If you can get by using the notifications, you are in luck - the other approach is MUCH more complicated, and probably quite error prone - not even sure it will work alike for various versions of windows ...

Regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Feb-11 18:02pm    
OP commented:

i looked but still coundt do anything i m trying about windows application :(
Sergey Alexandrovich Kryukov 6-Feb-11 18:04pm    
@ Member 3209383: Please don't create a new Answer -- will be removed. Instead, use "Add Comment" or "Improve Quesition".
Sergey Alexandrovich Kryukov 6-Feb-11 18:08pm    
@ Member 3209383: you should improve your Question.
Your comment indicates you did not understand this Answer. You should clearly state: I tried this, I did not understand that...
Your question is hard to understand. You should show your code, indicate your platform, library you use (WPF, Forms, ASP.NET).
--SA
Nish Nishant 6-Feb-11 21:48pm    
Voted 5, the shell API is probably the right direction.
Espen Harlinn 7-Feb-11 14:03pm    
Thank you, Nishant!
Adding to Espen's answer:

You can use a hook on the Explorer window (or rather a specific Explorer window) and try and read the contents of its child controls. That info together with the current mouse position can give you enough data to figure out if the mouse is hovering over a filename.

But since a lot of the Shell API is exposed via COM, you might want to use that. See this excellent article for more info:

Automate the Active Windows Explorer or Internet Explorer Window[^]
 
Share this answer
 
v2
Comments
Espen Harlinn 7-Feb-11 11:17am    
Good link, a 5 :)
i found something but i dont undetstand how can i use

[ComImport]
[Guid("00021500-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IQueryInfo
{
[PreserveSig]
void GetInfoTip(int dwFlags, out IntPtr ppwszTip);

[PreserveSig]
void GetInfoFlags(IntPtr pdwFlags);
}

but i am not sure this returns void ? so how can i get i didn't understand
 
Share this answer
 
v2
Comments
sreeyush sudhakaran 6-Oct-15 3:51am    
Please don't post answers you are not sure about , Instead you can give reference links
CHill60 7-Oct-15 9:15am    
This was the OP (incorrectly) responding by using Solutions instead of Comments - however it was over 4 years ago - your trivial edit of the solution has caused the post to come back into the recent updates list!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900