"qq交谈"是怎样实现的呢?
想在winform程序里实现,点击上面的图片,就启动qq程序,
这是怎样实现的呢?谢谢
------解决方案-------------------- private void btnRunQQ_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("tencent://message/?uin=QQ号码&Site=qq&Menu=yes");
}
------解决方案--------------------其中 “QQ号码” 用实际QQ号码代码就是了
------解决方案--------------------比如CSDN产品客服的QQ号码为 2355263776 那么代码就是
private void btnRunQQ_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("tencent://message/?uin=2355263776&Site=qq&Menu=yes");
}
------解决方案--------------------在QQ程序安装的时候,会在注册表的HTTP协议中加一个自定义协议,比如"tencent://",在这个协议关联的即是QQ所在调用程序.在网页上,网页代码链接就是"tencent://****",用户点击后,浏览器先检查注册表有无"tencent开头的协议,如果有,由传递给注册表中指定路径的程序打开.
以下是N年前用VB6写的,在地址栏输入dylike://或者链接以dylike://开头,即会调用指定的EXE打开并传递参数.
Begin VB.Form Form1
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Caption = "DYLIKE万能调用 V1.0"
ClientHeight = 4995
ClientLeft = 45
ClientTop = 435
ClientWidth = 4680
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Form1.frx":42711
ScaleHeight = 4995
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.Label Label2
BackStyle = 0 'Transparent
Height = 255
Left = 2400
MouseIcon = "Form1.frx":4BDB0
MousePointer