⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 l.html

📁 windowsAPI介绍。很详细的
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN">
<html>

<head>
<title>Windows 95 API Dictionary: L</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">- L -</h1>

<hr ALIGN="center" WIDTH="85%" SIZE="5">

<p ALIGN="left"><a NAME="lineto"></a></p>

<h3 ALIGN="center">LineTo Function</h3>
<code>

<p align="center">Declare Function LineTo Lib &quot;gdi32.dll&quot; (ByVal hdc As Long, 
ByVal x As Long, ByVal y As Long) As Long</code><br>
LineTo draws a line from the current point to the point specified on a graphical object. 
The line is drawn in the object's <code>.ForeColor</code> property. After the line is 
drawn, the endpoint specified is the new current point. This command is similar to Visual 
Basic's intrinsic Line method. Keep in mind that, because of the technique used by Windows 
to draw lines, the pixel that is the specified endpoint itself is not colored and is not 
considered part of the line. Don't ask me why this is done, but it also happens with VB's 
Line method. You can safely ignore the value 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 graphical object to draw on. </td>
  </tr>
  <tr>
    <td><code>x</code></td>
    <td>The x coordinate of the endpoint to draw to. </td>
  </tr>
  <tr>
    <td><code>y</code></td>
    <td>The y coordinate of the endpoint to draw to. </td>
  </tr>
</table>
<b>

<p>Example:</b><br>
<code>&nbsp;&nbsp;'Draw a red line from (0, 40) to (100, 50) on Form1<br>
&nbsp;&nbsp;Dim r As POINTAPI 'for MoveToEx function<br>
&nbsp;&nbsp;Form1.ForeColor = RGB(255, 0, 0) 'red<br>
&nbsp;&nbsp;x = MoveToEx(Form1.hdc, 0, 40, r) 'set the current point to (0, 40)<br>
&nbsp;&nbsp;x = LineTo(Form1.hdc, 100, 50) 'draw from (0, 40) to (100, 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"> </p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -