<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=49774&amp;view=findpost&amp;p=327853</guid>
        <pubDate>Tue, 30 Mar 2004 15:46:21 +0000</pubDate>
        <title>Как перемещать курсор по форме клавишами</title>
        <link>https://forum.sources.ru/index.php?showtopic=49774&amp;view=findpost&amp;p=327853</link>
        <description><![CDATA[Dufa: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Private Declare Function SetCursorPos Lib &quot;user32&quot; (ByVal x As Long, ByVal y As Long) As Long</div><div class="code_line">Private Declare Function GetCursorPos Lib &quot;user32&quot; (lpPoint As TPoint) As Long</div><div class="code_line">Private Type TPoint</div><div class="code_line">&nbsp;&nbsp; x As Long</div><div class="code_line">&nbsp;&nbsp; y As Long</div><div class="code_line">End Type</div><div class="code_line">Dim PT As TPoint</div><div class="code_line">Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)</div><div class="code_line">&nbsp;&nbsp; Call GetCursorPos(PT)</div><div class="code_line">&nbsp;&nbsp; Select Case KeyCode</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Case vbKeyUp: Call SetCursorPos(PT.x, PT.y - 10)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Case vbKeyDown: Call SetCursorPos(PT.x, PT.y + 10)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Case vbKeyLeft: Call SetCursorPos(PT.x - 10, PT.y)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Case vbKeyRight: Call SetCursorPos(PT.x + 10, PT.y)</div><div class="code_line">&nbsp;&nbsp; End Select</div><div class="code_line">End Sub</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>Dufa</author>
        <category>Работа с клавиатурой</category>
      </item>
	
      </channel>
      </rss>
	