3443.html

来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 23 行

HTML
23
字号
<html>
  <head>
    <title>Re: 如何将一个form每次开始时也在同一个地方?</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: 如何将一个form每次开始时也在同一个地方?</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by <a href="mailto:ml.peng@wsmc.com.tw">彭明柳</a> on June 23, 1998 at 22:42:15:<p>
In Reply to: <a href="3430.html">Re: 如何将一个form每次开始时也在同一个地方?</a> posted by 洛斯狄克 on June 23, 1998 at 13:30:04:<p>
1. 在Form_Load()事件中,加入以下程式码:<br>    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)<br>    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)<br>    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)<br>    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)<p>在Form_Unload()事件中,加入以下程式码<br>        SaveSetting App.Title, "Settings", "MainLeft", Me.Left<br>        SaveSetting App.Title, "Settings", "MainTop", Me.Top<br>        SaveSetting App.Title, "Settings", "MainWidth", Me.Width<br>        SaveSetting App.Title, "Settings", "MainHeight", Me.Height<p>如此一来,每回离开应用程式时,程式都会把离开的位置存入register中,载入时便能复原.<br>2. 如果您只是要开启时显示在同个地方,那就更简单了!<br>Form_Load()<br>Me.Move x1, y1 'x1, y1为您指定出现的值<br>或是在Design Mode中,指定StartUpPosition及Top, Left等属性不就好了?<br>Try it and enjoy it!
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 3443-->
</ul><!--end: 3443-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

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