Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
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
);
}
People also reading
Membership not found