網頁中啟動客戶端winForm應用程式

2021-07-26 18:19:41 字數 771 閱讀 3286

windows registry editor version 5.00

[hkey_local_machine\software\classes\test]

@="test"

"url protocol"="c:\\program files\\tencent\\qq2009\\bin\\qq.exe"

[hkey_local_machine\software\classes\test\defaulticon]

@="%systemroot%\\system32\\url.dll,0"

[hkey_local_machine\software\classes\test\shell]

[hkey_local_machine\software\classes\test\shell\open]

[hkey_local_machine\software\classes\test\shell\open\command]

@="c:\\program files\\tencent\\qq2009\\bin\\qq.exe"

你可以直接將它儲存為乙個reg檔案然後註冊,或者在你的應用程式安裝時直接修改登錄檔。

如果你點這個鏈結,你在註冊檔案裡的應用程式就可以被啟動了。

還有乙個需求,一般從網頁啟動應用需要傳遞引數(上面鏈結後面帶了三個引數),做法如下:

你的應用程式主函式要這樣接收引數:

static void main(string   args) 

}通過args[index]就可以訪問到你傳遞的引數了。

winform實現tcp客戶端

using system using system.io using system.net using system.net.sockets using system.text using system.threading using system.windows.forms namespace m...

啟動TCP Socket客戶端

include stdafx.h include include include pragma comment lib,ws2 32.lib define buf size 64 int tmain int argc,tchar argv wsadatawsd socketshost sockadd...

網頁呼叫 iOS Android 客戶端

如此便可以從網頁開啟客戶端了。這只是最簡單的 scheme 部分,除此之外,應該還有更多的引數,一般要約定好,讓網頁開發者和客戶端開發者兩者之間可以相互呼叫。具體邏輯如下 後記,還是相容性問題 另外,我這裡只是著重討論的網頁的部分。呼叫客戶端還是比較簡單的,如果需要呼叫客戶端裡面的某個乙個模組呢?客...