Click here to Skip to main content
15,908,444 members
Home / Discussions / C#
   

C#

 
GeneralRe: Read/Update flat files Pin
Krrish16-Jul-06 19:03
Krrish16-Jul-06 19:03 
GeneralRe: Read/Update flat files Pin
led mike16-Jul-06 19:47
led mike16-Jul-06 19:47 
GeneralRe: Read/Update flat files Pin
Krrish16-Jul-06 20:13
Krrish16-Jul-06 20:13 
QuestionIt must be >= 0 and < the PageCount Pin
vjain2314-Jul-06 19:23
vjain2314-Jul-06 19:23 
AnswerRe: It must be >= 0 and < the PageCount Pin
Colin Angus Mackay14-Jul-06 21:56
Colin Angus Mackay14-Jul-06 21:56 
AnswerRe: It must be >= 0 and < the PageCount Pin
Paul Conrad15-Jul-06 10:54
professionalPaul Conrad15-Jul-06 10:54 
QuestionRead location in .lnk (shortcut) file Pin
StyrofoamSUV14-Jul-06 18:56
StyrofoamSUV14-Jul-06 18:56 
AnswerRe: Read location in .lnk (shortcut) file Pin
kasik15-Jul-06 5:15
kasik15-Jul-06 5:15 
You can use the Windows Script Host Object Model COM library for this. If you're using Visual Studio, add a reference to it by selecting the COM tab from the Add Reference dialog and select "Windows Script Host Object Model". This will create an interop assembly called Interop.IWshRuntimeLibrary and will reference that. Then you can use the following code to extract the target file from a .lnk file...
<span style="color: blue;">using</span> IWshRuntimeLibrary;
 
...
 
WshShell shell = <span style="color: blue;">new</span> <span style="color: teal;">WshShell</span>();
<span style="color: teal;">IWshShortcut</span> link = (<span style="color: teal;">IWshShortcut</span>)shell.CreateShortcut( linkPath ); <span style="color: green;">//where linkPath is the filepath to the .lnk file</span>
 
<span style="color: teal;">Process</span>.Start( link.TargetPath ); <span style="color: green;">//link.TargetPath points to the file the link targets</span>
Hope that helps Smile | :)



“Accept that some days you are the pigeon, and some days you are the statue” -- David Brent

Cheers,
Will
GeneralRe: Read location in .lnk (shortcut) file Pin
StyrofoamSUV15-Jul-06 6:46
StyrofoamSUV15-Jul-06 6:46 
QuestionHow can I display a .mht file on a webBrwoser control? Pin
AngryC14-Jul-06 15:49
AngryC14-Jul-06 15:49 
AnswerRe: How can I display a .mht file on a webBrwoser control? Pin
Andrew Lygin14-Jul-06 19:20
Andrew Lygin14-Jul-06 19:20 
QuestionStringCollection Property Design Time Editing Pin
Loophole14-Jul-06 13:10
Loophole14-Jul-06 13:10 
AnswerRe: StringCollection Property Design Time Editing Pin
Robert Rohde15-Jul-06 11:13
Robert Rohde15-Jul-06 11:13 
GeneralRe: StringCollection Property Design Time Editing Pin
Loophole17-Jul-06 6:12
Loophole17-Jul-06 6:12 
GeneralRe: StringCollection Property Design Time Editing Pin
Robert Rohde17-Jul-06 7:14
Robert Rohde17-Jul-06 7:14 
GeneralRe: StringCollection Property Design Time Editing [modified] Pin
Loophole20-Jul-06 7:11
Loophole20-Jul-06 7:11 
GeneralRe: StringCollection Property Design Time Editing Pin
Robert Rohde20-Jul-06 10:37
Robert Rohde20-Jul-06 10:37 
QuestionLaunch other program in mdi? Pin
Toreddo14-Jul-06 11:59
Toreddo14-Jul-06 11:59 
AnswerRe: Launch other program in mdi? Pin
Dave Kreskowiak14-Jul-06 16:33
mveDave Kreskowiak14-Jul-06 16:33 
GeneralRe: Launch other program in mdi? Pin
Toreddo14-Jul-06 20:06
Toreddo14-Jul-06 20:06 
GeneralRe: Launch other program in mdi? Pin
Colin Angus Mackay14-Jul-06 21:57
Colin Angus Mackay14-Jul-06 21:57 
GeneralRe: Launch other program in mdi? Pin
Toreddo15-Jul-06 2:26
Toreddo15-Jul-06 2:26 
AnswerRe: Launch other program in mdi? Pin
stancrm14-Jul-06 23:16
stancrm14-Jul-06 23:16 
GeneralRe: Launch other program in mdi? Pin
Toreddo15-Jul-06 2:28
Toreddo15-Jul-06 2:28 
AnswerRe: Launch other program in mdi? Pin
Eran Aharonovich16-Jul-06 3:47
Eran Aharonovich16-Jul-06 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.