window form contains desktop icon

S

Steve Richter

can a desktop icon, used to launch an application window like windows
explorer, be a child control in a window form? I checked the windows
forms controls in VS2005 and did not see any such control.

I would like my code to display all the .LNK files in a directory on a
form, handle the single and double click events on the icon, launch
the application when double click, ...

thanks,

-Steve
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

It'not that simple, the Icons are not independly entities, they are embedded
in .EXE and extracted and displayed in the screen.
The link file just says where to get the icon from.

Dont' remember if there is a managed way to extract the icon from a .exe
 
S

Steve Richter

Hi,

It'not that simple, the Icons are not independly entities, they are embedded
in .EXE and extracted and displayed in the screen.
The link file just says where to get the icon from.

good to know. thanks.
 
B

Ben Voigt [C++ MVP]

Steve Richter said:
can a desktop icon, used to launch an application window like windows
explorer, be a child control in a window form? I checked the windows
forms controls in VS2005 and did not see any such control.

I would like my code to display all the .LNK files in a directory on a
form, handle the single and double click events on the icon, launch
the application when double click, ...

I guess you are looking for a "Explorer View" control rather like the
ListView common control. Don't know of any.

There are customization callbacks for the File Open dialog that allow
unlimited extensibility. So instead of having a control to embed in your
form, you can use the File Open dialog as your form and add the other
controls you need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top