打开QQ软件

Blue_all_the_sky 2010-10-22 11:13:23
比如有一个button,当你点击它的时候,打开QQ
(QQ在D盘),本人菜鸟,请大家给个代码
...全文
179 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Blue_all_the_sky 2010-10-22
  • 打赏
  • 举报
回复
6楼的最好。。。刚开始不会,会了才知道这个最好
senyi168 2010-10-22
  • 打赏
  • 举报
回复
try
{
Process proc = new Process();
proc.StartInfo.FileName = "D:\\QQ.exe" ;
proc.Start();
Console.WriteLine("成功!");
}
catch
{
Console.WriteLine("失败!");
}
事理 2010-10-22
  • 打赏
  • 举报
回复

//Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Tencent\\PlatForm_Type_List\\1", true);
//string qq2008Path = regKey.GetValue("TypePath").ToString();
//regKey.Close();
//Process.Start(qq2008Path);



Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Tencent\\PlatForm_Type_List\\3", true);
string qq2010Path = regKey.GetValue("TypePath").ToString();
regKey.Close();
if (!string.IsNullOrEmpty(qq2010Path))
{
Process.Start(qq2010Path);}



Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Tencent\\PlatForm_Type_List\\3", true);
string qq2009Path = regKey.GetValue("TypePath").ToString();
regKey.Close();
if (!string.IsNullOrEmpty(qq2009Path))
{
Process.Start(qq2009Path);}


我电脑上是可以了,这个比较好点,自动找qq安装位置,适用于qq正式版本
skyering 2010-10-22
  • 打赏
  • 举报
回复
嗯 不会! 学习学习了!
一克代码 2010-10-22
  • 打赏
  • 举报
回复
楼上的都已经说了!
懦芞 2010-10-22
  • 打赏
  • 举报
回复
D:\Program Files\Tencent\QQ\Bin\QQ.exe是你的QQ的安装路径。
懦芞 2010-10-22
  • 打赏
  • 举报
回复
System.Diagnostics.Process.Start(@"D:\Program Files\Tencent\QQ\Bin\QQ.exe");
q107770540 2010-10-22
  • 打赏
  • 举报
回复
Process.Start("d:\qq.exe")

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧