在最后加一個end Type,如下
Private Type POINTAPI
x As Long
y As Long
End Type
調(diào)用坐標(biāo)的方法如下:
Dim P1 As POINTAPI
GetCursorPos P1
Label1.Caption = CStr(P1.x) & "," & CStr(P1.y)
好心人幫我弄弄這個,看看這個程序哪里錯了,怎么改吧~~~謝謝呀
好心人幫我弄弄這個,看看這個程序哪里錯了,怎么改吧~~~謝謝呀
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Type POINTAPI
x As Long
y As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Type POINTAPI
x As Long
y As Long
其他人氣:101 ℃時間:2020-03-26 23:35:29
優(yōu)質(zhì)解答
我來回答
類似推薦
- 好心人幫我看看程序錯在哪,為什么?
- 在3時到4時之間的哪個時刻,鐘的時針與分針:
- 快車與慢車從相距300千米的兩城同時相向而行,在距離中點25千米相遇,慢車與快車的速度比多少?
- 甲、乙兩數(shù)和是1.98,如果把甲縮小到原來的1/10,那么甲與乙的比是1:1,原來甲數(shù)是_,乙數(shù)是_.
- 詞最早出現(xiàn)在(...)時期
- 請設(shè)計實驗來證明一朵花中只有雄蕊和雌蕊與果實種子的形成有直接關(guān)系
- 李白 杜甫 李賀 王維 白居易 的詩各兩首
- opencv 求解釋語句:((uchar*)(Img1->imageData + Img1->widthStep*pt.y))[pt.x]的具體含義
- of danger 和 in danger的具體區(qū)別
- Mid-Autnmn Festival is on autumn.中哪個單詞是錯的,還要寫出對的單詞來.
- 根據(jù)句意和英文釋義填寫單詞:Why don't you go for a walk ____(with each other)?
- 已知某企業(yè)的生產(chǎn)函數(shù)為Q=L(2/3)K(1/3) ,勞動的 價格ω=2,資本的價格r=1.1 當(dāng)成本C=3000時,企業(yè)
猜你喜歡
- 1仿寫句子:生活!你是一杯酒,散發(fā)著迷人的醉香.
- 21杯水五分之四千克,二分之一杯水重幾千克/四分之三杯水重幾千克?
- 3買8瓶可樂和10個漢堡,共花了126.4元,已知漢堡8.8元一個求可樂多少元一瓶?
- 4北京時間2013年5月2日8點,東12區(qū),西12區(qū).分別是?
- 5英語翻譯
- 6誰能說出100字左右的寫景作文?
- 7橢圓x2m+y2n=1的焦點在y軸上,且m∈{1,2,3,4,5},n∈{1,2,3,4,5,6,7},則這樣的橢圓的個數(shù)為 _ .
- 8柳樹用英語怎么說?
- 9請問最快的學(xué)英語的方法是什么?急
- 10怎么寫英文簽名 50分!
- 11王家莊果園有桃樹1500克,占果樹總數(shù)的5分之3,梨樹的棵樹占果樹總數(shù)的5分之2,王家莊果園有梨樹多少棵?
- 12初一幾何角度112.27度等于112度多少分多少秒?