My issue is essentially spelled out in the title. I want to be able to catch clicks (more specifically double clicks) on icons on the desktop or in folders or wherever, and tell where the click was on the icon (the coordinates of the click along with the whole size of where they could have clicked).

What I'm trying to do is make it so that you can open a file with different programs easily by clicking on different parts of the icon. For example, I want to be able to double click on a python file on the left side to open it with a certain text editor I like to use, and on the right to open it with the python interpreter.

Recommended Answers

All 6 Replies

Hm... So you want to find out the position of the mouse when it double clicks?

Hm... So you want to find out the position of the mouse when it double clicks?

Well, if it double-clicks on an icon, the top corner of the icon, the width and height of it, and yes, the coordinates of the cursor. I'd also like to know how to stop a program from coming up, but I can probably manage that if no one knows it off the top of their head.

Any idea which GUI toolkit you want to use?

I don't need a specific GUI toolkit, I just want to get the job done of detecting double clicks on the desktop and the selection of icons as well as the location of the click relative to the position of the icon selected.

So the next questions is:
What operating system are you using?

I'm using Windows Vista (32-bit), but I'd like for my code to run on Windows XP, and possibly 7 as well.

One new thing, I've noticed on PDFs that it displays the file and has a mini icon in the corner displaying my main PDF reader. If possible, I'd like to make it so that there are multiple mini-icons along the bottom of the normal icon that display the various programs that can be used to open it, and when each of these mini-icons are clicked on, the application opens.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.