怎麼用PostMessage按計算器的鍵

2022-06-25 04:11:34 字數 2786 閱讀 7576

1樓:匿名使用者

dim lngwindowhwnd as long

dim lngbutton_0_hwnd as long

dim lngbutton_1_hwnd as long

dim lngbutton_2_hwnd as long

dim lngbutton_3_hwnd as long

dim lngbutton_4_hwnd as long

dim lngbutton_5_hwnd as long

dim lngbutton_6_hwnd as long

dim lngbutton_7_hwnd as long

dim lngbutton_8_hwnd as long

dim lngbutton_9_hwnd as long

private declare function postmessage lib "user32" alias "postmessagea" (byval hwnd as long, byval wmsg as long, byval wparam as long, byval lparam as long) as long

private declare function findwindow lib "user32" alias "findwindowa" (byval lpclassname as string, byval lpwindowname as string) as long

private declare function findwindowex lib "user32" alias "findwindowexa" (byval hwnd1 as long, byval hwnd2 as long, byval lpsz1 as string, byval lpsz2 as string) as long

'private sub command1_click()

command1.caption = cstr(clng(command1.caption) + 1)

dim lngp as long

按下滑鼠左鍵

鬆開滑鼠左鍵

end sub

private sub form_load()

shell "calc.exe"

command1.caption = "0"

lngwindowhwnd = findwindow(vbnullstring, "計算器")

end sub

2樓:匿名使用者

private declare function findwindow lib "user32" alias "findwindowa" (byval lpclassname as string, byval lpwindowname as string) as long

private declare function postmessage lib "user32" alias "postmessagea" (byval hwnd as long, byval wmsg as long, byval wparam as long, byval lparam as long) as long

private sub command1_click()

dim hwnd as long

hwnd = findwindow(vbnullstring, "計算器")

postmessage hwnd, wm_keydown, vbkey5, 0 '按一次"5"

end sub

怎麼用css把li分左右兩列按列排列

ulli16 2738 49510 要不來然源用2個 baiul設為 duzhifloat也可以dao div css如何做頁面的一行兩列布局 感覺很亂.實現你說的效果.如果是居中版式,首先要有個總寬度,比如width 800px 放左邊的用position relative float left ...

吉他左手怎麼按弦吉他左手怎麼按規範?

1 左手按弦時,各手指的指關節要自然彎曲,按弦手指的第一 指節 要與指板儘量垂直,用手指的指尖頂部按弦。2 拇指伸直用指肚托住琴頸後部的中線部位,作為左手發力的支撐點。食指 中指 無名指和小指各關節要能靈活運動 伸展。3 左手掌 虎口處不要貼住琴頸,更不要採取 一把抓 的方式來持握琴頸,因為這樣會降...

刺客信條兄弟會怎麼用降落傘?按什麼鍵出來

xbox360 從高處跳下後長按x鍵即可開啟 用完可去裁縫店買pc版本 按攻擊鍵,既是滑鼠左鍵 空中按攻擊鍵 滑鼠左鍵或者手柄x鍵 刺客信條兄弟會的降落傘怎麼用 需要辦完達芬奇所有戰爭機械的任務才能得到降落傘,使用的話只要在空中點一下攻擊鍵就行去裁縫店 衣服上色的地方 可以買 去賣衣服的地方買,或者...