?? getkeyboardstate.htm
字號(hào):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style><!--
body,table {font-family:"宋體"; font-size: 9pt; line-height:11pt;}
a {text-decoration:none} a:hover {color:red;text-decoration:underline}
--></style>
<title>GetKeyboardState</title>
</head>
<body link="#FF0000" vlink="#FF0000" alink="#FF0000" bgcolor="#FFC8C8">
<div align="center"><center>
<table border="0" width="100%" height="22" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="16">GetKeyboardState</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="1" width="100%" bordercolorlight="#808080" cellspacing="0"
bordercolordark="#FFFFFF">
<tr>
<td width="102%" colspan="2">VB聲明</td>
</tr>
<tr>
<td width="102%" colspan="2">Declare Function GetKeyboardState Lib "user32"
Alias "GetKeyboardState" (pbKeyState As Byte) As Long</td>
</tr>
<tr>
<td width="102%" colspan="2">說明</td>
</tr>
<tr>
<td width="102%" colspan="2">取得鍵盤上每個(gè)虛擬鍵當(dāng)前的狀態(tài)</td>
</tr>
<tr>
<td width="102%" colspan="2">返回值</td>
</tr>
<tr>
<td width="102%" colspan="2">Long,非零表示成功,零表示失敗。會(huì)設(shè)置<a
href="GetLastError.htm">GetLastError</a></td>
</tr>
<tr>
<td width="102%" colspan="2">參數(shù)表</td>
</tr>
<tr>
<td width="25%">參數(shù)</td>
<td width="77%">類型及說明</td>
</tr>
<tr>
<td width="25%">pbKeyState</td>
<td width="77%">Long,總共含256個(gè)條目的字節(jié)數(shù)組中的第一個(gè)項(xiàng)目。每個(gè)字節(jié)都會(huì)附帶載入與虛擬鍵對應(yīng)的狀態(tài)。如開關(guān)鍵打開,則位0設(shè)為1(開關(guān)鍵包括CapsLock,
NumLock, ScrollLock);如某個(gè)鍵當(dāng)時(shí)按下,則位7為1;如已經(jīng)抬起,則為0</td>
</tr>
<tr>
<td width="102%" colspan="2">注解</td>
</tr>
<tr>
<td width="102%" colspan="2"><p align="left">虛擬鍵碼常數(shù) VK_?
作為數(shù)組的索引使用。這個(gè)函數(shù)相應(yīng)于取得按鍵狀態(tài)于一瞬間的“快照”——鍵按下或松開以后,數(shù)組不會(huì)自動(dòng)更新。在win32中注意用一個(gè)字節(jié)數(shù)組避免由于vb向Unicode的內(nèi)部轉(zhuǎn)換而導(dǎo)致錯(cuò)誤</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="right">Top</td>
</tr>
</table>
</center></div>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -