?? j.html
字號:
<!DOCTYPE html PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN">
<html>
<head>
<title>Windows 95 API Dictionary: J</title>
<base TARGET="_self">
<script LANGUAGE="JavaScript">
<!--Cloak
function statbar(txt) {
window.status = txt;
setTimeout("erase()",3000);
}
function erase() {
window.status = "";
}
//Decloak-->
</script>
</head>
<body BGCOLOR="#004000" TEXT="#FFFFFF" LINK="#FFFF00" VLINK="#FF8000" ALINK="#80FF80">
<p><a NAME="top"></a></p>
<h1 ALIGN="center">- J -</h1>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"><a NAME="joygetdevcaps"></a></p>
<h3 ALIGN="center">joyGetDevCaps Function</h3>
<code>
<p align="center">Declare Function joyGetDevCaps Lib "winmm.dll" Alias
"joyGetDevCapsA" (ByVal id As Long, ByVal lpCaps As <a HREF="appa.html#joycaps">JOYCAPS</a>,
ByVal uSize As Long) As Long</code><br>
joyGetDevCaps reads various information about a joystick. This information is put into <code>lpCaps</code>.
This is not to be confused with getting the current status of the joystick. The return
value is an error code. If it is zero, the joystick is connected and in working order. </p>
<table WIDTH="95%" CELLSPACING="0" BORDER="2">
<tr>
<td WIDTH="20%"><code>id</code></td>
<td WIDTH="80%">The ID # of the joystick to read. Windows 95 starts counting joysticks at
0, so Joystick 1's ID is 0, Joystick 2's ID is 1, etc. </td>
</tr>
<tr>
<td><code>lpCaps</code></td>
<td>Receives the information about the joystick. </td>
</tr>
<tr>
<td><code>uSize</code></td>
<td>The length in bytes of <code>lpCaps</code> (use the Len function). </td>
</tr>
</table>
<b>
<p>Example:</b><br>
<code> 'Check to see if Joystick 1 is connected<br>
DIM cap As JOYCAPS<br>
x = joyGetDevCaps(0, cap, Len(cap))<br>
If x = 0 Then Debug.Print "Joystick 1 is in full working order."</code><br>
<br>
<b>Category:</b> <a HREF="index.html#joystick" REL="Index">Joystick</a><br>
<a HREF="index.html" REL="Index">返回到索引.</a> </p>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"><a NAME="joygetnumdevs"></a></p>
<h3 ALIGN="center">joyGetNumDevs Function</h3>
<code>
<p align="center">Declare Function joyGetNumDevs Lib "winmm.dll" () As Long</code><br>
joyGetNumDevs returns the number of configured joysticks under the Windows 95 Control
Panel. This doesn't mean that all of them are in working order, just that there are that
many possible. To test if the joystick works, poll for input and check the error code.<br>
<br>
<b>Example:</b><br>
<code> 'Look for the number of configured joysticks<br>
num_joysticks = joyGetNumDevs()</code><br>
<br>
<b>Category:</b> <a HREF="index.html#joystick" REL="Index">Joystick</a><br>
<a HREF="index.html" REL="Index">返回到索引.</a> </p>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"><a NAME="joygetpos"></a></p>
<h3 ALIGN="center">joyGetPos Function</h3>
<code>
<p align="center">Declare Function joyGetPos Lib "winmm.dll" (ByVal uJoyID As
Long, pji As <a HREF="appa.html#joyinfo">JOYINFO</a>) As Long</code><br>
joyGetPos reads the current position of the joystick. This information is put into <code>pji</code>.
The value returned is an error code. If it is zero, the joystick is connected and in
working order.<br>
</p>
<table WIDTH="95%" CELLSPACING="0" BORDER="2">
<tr>
<td WIDTH="20%"><code>uJoyID</code></td>
<td WIDTH="80%">The ID # of the joystick to read. Windows 95 starts counting joysticks at
0, so Joystick 1's ID is 0, Joystick 2's ID is 1, etc. </td>
</tr>
<tr>
<td><code>pji</code></td>
<td>Receives the joystick's current position. </td>
</tr>
</table>
<b>
<p>Example:</b><br>
<code> 'Read the x and y coordinates<br>
Dim pos As JOYINFO<br>
x = joyGetPos(0, pos)<br>
Debug.Print pos.wXpos, pos.wYpos</code><br>
<br>
<b>Category:</b> <a HREF="index.html#joystick" REL="Index">Joystick</a><br>
<a HREF="index.html" REL="Index">返回到索引.</a> s</p>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"> </p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -