问题描述
C#使用SendMessage发送组合键Ctrol+O键调用某一个应用程序的打开界面,使用sendmessage给该应用程序发送Ctrol+O消息打开某一个文件的界面(当然这个地方也可以用process.start直接打开),用spy+++截取的Ctrol+O键消息为:<00001>000310DCPWM_KEYDOWNnVirtKey:VK_CONTROLcRepeat:1ScanCode:1DfExtended:0fAltDown:1fRepeat:0fUp:0<00002>000310DCPWM_KEYDOWNnVirtKey:'O'cRepeat:1ScanCode:18fExtended:0fAltDown:1fRepeat:0fUp:0<00003>000310DCPWM_KEYUPnVirtKey:'O'cRepeat:1ScanCode:18fExtended:0fAltDown:1fRepeat:1fUp:1<00004>000310DCPWM_KEYUPnVirtKey:VK_CONTROLcRepeat:1ScanCode:1DfExtended:0fAltDown:0fRepeat:1fUp:1也就是写四个sendmessage函数hwnd,wMsg,wParam都没有问题,就是最后一个lparam不知道怎么取(貌似应该跟ScanCode:1D和ScanCode:18有关??)望高手解答,谢了
解决方案
时间: 2024-11-10 01:19:43