📄 e.html
字号:
<!DOCTYPE html PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN">
<html>
<head>
<title>Windows 95 API Dictionary: E</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">- E -</h1>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"><a NAME="ellipse"></a></p>
<h3 ALIGN="center">Ellipse Function</h3>
<code>
<p align="center">Declare Function Ellipse Lib "gdi32.dll" (ByVal hdc As Long,
ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long</code><br>
Ellipse draws an ellipse on a graphical object. The two coordinates passed to the function
are not actually a part of the ellipse itself! Imagine the smallest possible rectangular
box containing the ellipse. X1 and Y1 are the coordinates of the upper-left corner, and X2
and Y2 are the coordinates of the lower-right corner. The ellipse is drawn with the color
of the object's <code>ForeColor</code> property. You can safely ignore the error code
returned.<br>
</p>
<table WIDTH="95%" BORDER="2" CELLSPACING="0">
<tr>
<td WIDTH="20%"><code>hdc</code></td>
<td WIDTH="80%">The device context of the object. </td>
</tr>
<tr>
<td><code>X1</code></td>
<td>The x coordinate of the imaginary box's upper-left corner. </td>
</tr>
<tr>
<td><code>Y1</code></td>
<td>The y coordinate of the imaginary box's upper-left corner. </td>
</tr>
<tr>
<td><code>X2</code></td>
<td>The x coordinate of the imaginary box's lower-right corner. </td>
</tr>
<tr>
<td><code>Y2</code></td>
<td>The y coordinate of the imaginary box's lower-right corner. </td>
</tr>
</table>
<b>
<p>Example:</b><br>
<code> 'Draw a red ellipse<br>
Picture1.ForeColor = RGB(255, 0, 0) 'red<br>
x = Ellipse(Picture1.hdc, 25, 25, 75, 50)</code><br>
<br>
<b>Category:</b> <a HREF="index.html#graphics" REL="Index">Graphics</a><br>
<a HREF="#top">返回到索引</a><a HREF="index.html" REL="Index">.</a> </p>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"><a NAME="equalrect"></a></p>
<h3 ALIGN="center">EqualRect Function</h3>
<code>
<p align="center">Declare Function EqualRect Lib "user32.dll" (lpRect1 As <a
HREF="appa.html#rect">RECT</a>, lpRect2 As <a HREF="appa.html#rect">RECT</a>) As Long</code><br>
EqualRect determines if two RECT-type variables are equal. Rectangles are considered equal
if and only if the .Left, .Top, .Right, and .Bottom properties of one equal the .Left,
.Top, .Right, and .Bottom properties of the other. In other words, they are equal if they
identify exactly the same rectangle. The function returns 1 if the rectangles are equal
and 0 if the rectangles are unequal.<br>
</p>
<table WIDTH="95%" BORDER="2" CELLSPACING="0">
<tr>
<td WIDTH="20%"><code>lpRect1</code></td>
<td WIDTH="80%">The first of the two rectangles to check. </td>
</tr>
<tr>
<td><code>lpRect2</code></td>
<td>The second of the two rectangles to check. </td>
</tr>
</table>
<b>
<p>Example:</b><br>
<code> 'Check to see if the rectangles are equal<br>
'This example uses the SetRect API function to set the values of a RECT<br>
Dim r As RECT, s As RECT<br>
x = SetRect(r, 50, 50, 150, 150) 'Set r.Left, .Top, .Right, .Bottom<br>
x = SetRect(s, 50, 50, 150, 150) 'Set s the same way<br>
Form1.Print EqualRect(r, s) 'returns 1 -- they are equal<br>
x = SetRect(s, 100, 100, 200, 200) 'Set s to this<br>
Form1.Print EqualRect(r, s) 'returns 0 -- they are unequal</code><br>
<br>
<b>Related Call:</b> <a HREF="c.html#copyrect">CopyRect</a><br>
<b>Category:</b> <a HREF="index.html#rectmanipulation" REL="Index">RECT Manipulation</a><br>
<a HREF="#top">返回到索引</a><a HREF="index.html" REL="Index">.</a> </p>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"><a NAME="exitwindowsex"></a></p>
<h3 ALIGN="center">ExitWindowsEx Function</h3>
<code>
<p align="center">Declare Function ExitWindowsEx Lib "user32.dll" (ByVal uFlags
As Long, ByVal dwReserved As Long) As Long</code><br>
ExitWindowsEx allows you to easily reboot or even shut down the user's computer. Its
commands have basically the same effect as the Shut Down option on the Start Menu do, only
no prompt appears. Of course, the computer will shut down or reboot immediately, so don't
expect you program to continue running after you execute the function. The function
returns an error code that you can safely ignore.<br>
</p>
<table WIDTH="95%" BORDER="2" CELLSPACING="0">
<tr>
<td WIDTH="20%"><code>uFlags</code></td>
<td WIDTH="80%">Exactly one of the <a HREF="appb.html#exitwindows">Exit Windows flags</a>
that tell the function what to do. </td>
</tr>
<tr>
<td><code>dwReserved</code></td>
<td>Reserved for future versions of Windows. Always set to 0. </td>
</tr>
</table>
<b>
<p>Example:</b><br>
<code> 'This code will reboot the user's computer.<br>
x = ExitWindowsEx(EWX_REBOOT, 0)</code><br>
<br>
<b>Category:</b> <a HREF="index.html#misc" REL="Index">Miscellaneous/Uncategorized</a><br>
<a HREF="#top">返回到索引</a><a HREF="index.html" REL="Index">.</a> </p>
<hr ALIGN="center" WIDTH="85%" SIZE="5">
<p ALIGN="left"> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -