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

📄 4983.html

📁 以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题.对一些VB初学者很用.
💻 HTML
字号:
<html>
  <head>
    <title>Re: 如何让USER自行拖曳放大缩小TextBox?</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: 如何让USER自行拖曳放大缩小TextBox?</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by <a href="mailto:honey0@tcts1.seed.net.tw">Honey</a> on August 23, 1998 at 00:19:18:<p>
In Reply to: <a href="4943.html">如何让USER自行拖曳放大缩小TextBox?</a> posted by Richard on August 21, 1998 at 13:17:37:<p>
: 请教各位前辈:<br>:  Form大小可由User拖曳控制请教Form里的TextBox如何也让User自行拖曳控制?<p>我把以前写过的拿出来给你参考一下下 <br>有些部分还是得靠你自己修改喔<br>原理其实很简单啦 希望你能看的懂  <p>表单(Form1)上有一个Text1<p>'以下从一般宣告开始<br>Dim gx As Single<br>Dim gy As Single<br>Dim Jx As Single<br>Dim Jy As Single<br>Dim J, K<br>Dim S, D<br>Option Explicit<p>Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<br>Jx = X<br>Jy = Y<br>J = Text1.Width<br>K = Text1.Height<br>End Sub<p>Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)<br>S = Text1.Left + Text1.Width<br>D = Text1.Top + Text1.Height<br>On Error GoTo FINISH<br>If X > S - 50 And X < S + 50 Then<br>Form1.MousePointer = 9 '东西指向<br>End If<br>If Y > D - 50 And Y < D + 50 Then<br>Form1.MousePointer = 7 '南北指向<br>End If<br>If Y > D And Y < D + 40 _<br>And X > D And X < D + 40 Then<br>Form1.MousePointer = 8'西北东南指向<br>End If<br>If Button = 1 And Not Form1.MousePointer = 0 Then<br>If Form1.MousePointer = 8 Then<br>Text1.Width = J - Jx + X<br>Text1.Height = K - Jy + Y<br>End If<br>If Form1.MousePointer = 7 Then<br>Text1.Height = K - Jy + Y<br>End If<br>If Form1.MousePointer = 9 Then<br>Text1.Width = J - Jx + X<br>End If<br>End If<br>FINISH:<p>End Sub<p>Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<br>gx = X<br>gy = Y<br>J = Text1.Width<br>K = Text1.Height<br>Text1.MousePointer = 5<br>End Sub<p>Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)<br>S = Text1.Left + Text1.Width<br>D = Text1.Top + Text1.Height<br>If Y > D And Y < D + 40 _<br>And X > D And X < D + 40 Then<br>Form1.MousePointer = 8<br>End If<br>If Button = 1 Then<br>Text1.MousePointer = 5<br>Text1.Left = Text1.Left - gx + X<br>Text1.Top = Text1.Top - gy + Y<br>Else<br>Text1.MousePointer = 0<br>End If<br>End Sub<p> <p>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 4983-->
<!--top: 4988--><li><a href="4988.html">Re: 如何让USER自行拖曳放大缩小TextBox?</a> <b>Richard</b> <i>13:41:34 8/23/98</i>
(<!--responses: 4988-->0)
<ul><!--insert: 4988-->
</ul><!--end: 4988-->
</ul><!--end: 4983-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

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