473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to retrive target file from a shorcut icon using C#

How do I get the file path(target file) of a short-cut
icon if I'm writing my application in C#.

Nov 13 '05 #1
1 4128
John,

You will want to take a look at the section of the MSDN documentation
titled "Shell Links", located at (watch for line wrap):

http://msdn.microsoft.com/library/de...s/shortcut.asp

In it, there is a section titled "Using Shell Links". There is an
example in C++ that can be converted to .NET (using COM interop) which you
can use to resolve the path that a shell link points to.

Also, you should be able to set a reference to shell32.dll and use the
ShellLinkObject to do the same thing.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"John" <wi********@hotmail.com> wrote in message
news:03****************************@phx.gbl...
How do I get the file path(target file) of a short-cut
icon if I'm writing my application in C#.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Viktor Zadro | last post by:
Icon Does Not Display Correctly in user's desktop(win98) when install my visual basic.net setup project. Why?
3
by: danijela.simunovic | last post by:
Hello! I have got a problem. i have an access database which has no menues(File,Edit,View...the access menues) and so on so i can't edit nothing. i can only see the main form and i can use the...
10
by: darren | last post by:
hi iam righting aprogram that creates its own desktop shotcut and a want to add a command line switch so i want to have a string like this "C:\Documents and Settings\Darren\My Documents\Visual...
2
by: Xavier Valdés | last post by:
Hi all, I'm using SHGetFileInfo api call from VB.NET so as to retreive icon associated of a file. I want also to get "type of file" string with SHGFI_TYPENAME flag but I can't see nothing. When...
2
by: peter | last post by:
Is it possible to create a drop target on a client computer's desktop so that if a user drags or drops a file jpeg on it will be used by the target program? IE. User drags a file to the icon...
5
by: IcingDeath via DotNetMonster.com | last post by:
I am building this SQL Server database app in which i can store files. In order to display files I want to have the app show the associated icon for the extension of the file that is in the...
4
by: Peter Larsen | last post by:
Hi, I want to be able to show a file browser embedded on a form - a browser which is similar to the browser you get by SHBrowseForFolder(). Is that possible ? Thank you in advance. BR Peter...
2
by: Eugene | last post by:
Hi, I have a problem when loading one of my dll. I have a main class that would load a winform in another dll using reflection. When I load it using Assembly.CreateInstance(DLLName.DLLFormName), an...
7
by: sreenulanka | last post by:
please help me in my forum i have labels and textareas .iwant to add textarea components dyanamically when i am clicking the button.please help me import java.awt.*; import javax.swing.*;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.