Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to find and launch the application associated with a file type
WhatsApp
Mike Gold
17y
5.8
k
0
0
25
Blog
if
(
System
::
Windows
::
Forms
::
MessageBox
::
Show
(
"Would you like to Open with the Associated Editor?"
,
"Confirm"
,
MessageBoxButtons
::
YesNo
) ==
System
::
Windows
::
Forms
::
DialogResult
::
Yes
)
{
char
resultExecutable
[500];
FindExecutable
(
ToUnmanagedString
(
pathOutput
).
c_str
(),
""
,
resultExecutable
);
String
^
associatedApplication
=
gcnew
String
(
resultExecutable
);
associatedApplication
=
String
::
Format
(
"\"{0}\""
,
associatedApplication
);
System
::
Diagnostics
::
Process
::
Start
(
associatedApplication
,
pathOutput
);
}
Up Next
Encrypting Web.Config file of a ASP.NET 2.0 application in Webfarm Scenario
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Membership not found