WinMove;<hr>;<blockquote>

xiaoxiao2021-02-27  332

<hr> 标签在 HTML 页面中创建一条水平线。

水平分隔线(horizontal rule)可以在视觉上将文档分隔成各个部分。

<blockquote> 标签定义块引用。

<blockquote> 与 </blockquote> 之间的所有文本都会从常规文本中分离出来,经常会在左、右两边进行缩进(增加外边距),而且有时会使用斜体。也就是说,块引用拥有它们自己的空间。

style="text-align:center”  设置文本居中显示       不用 

DIV相对页面居中,其实不建议用text-align:center来做DIV的居中   ,  会遇到各种浏览器兼容的问题。

只要定义div的width:900px; margin:0 auto; 这个DIV就会居中了。

<div style="height:60px"></div>    来设置页面空白部分高度

WinMove

Moves and/or resizes a window.

WinMove ( "title", "text", x, y [, width [, height [, speed]]] )

Parameters

titleThe title/hWnd/class of the window to move/resize. See Title special definition.textThe text of the window to move/resize. See Text special definition.xX coordinate to move to.yY coordinate to move to.width[optional] New width of the window.height[optional] New height of the window.speed[optional] the speed to move the windows in the range 1 (fastest) to 100 (slowest). If not defined the move is instantaneous.

Return Value

Success:a handle to the window.Failure:0 if the window is not found.

Remarks

WinMove() has no effect on minimized windows, butWinMove() works on hidden windows. If the width and height are small (or negative), the window will go no smaller than 112 x 27 pixels. If width and height are large, the window will go no larger than approximately [12+@DesktopWidth] x [12+@DesktopHeight] pixels. Negative values are allowed for the x and y coordinates. In fact, you can move a window off screen; and if the window's program is one that remembers its last window position, the window will appear in the corner (but fully on-screen) the next time you launch the program. If multiple windows match the criteria, the most recently active window is used. If x and y equal to the Default keyword no move occurs, just resizing. When speed is used the move is done with the new size.

Related

WinActivate,WinClose, WinGetClientSize, WinGetPos, WinSetState

Example

Example() Func Example()     ; Run Notepad     Run("notepad.exe")     ; Wait 10 seconds for the Notepad window to appear.     Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)     ; Retrieve the position as well as the height and width of the Notepad window. We will use this when we have to move the window back to the original position.     Local $aPos = WinGetPos($hWnd)     ; Move the Notepad to the x, y position of 0, 0 and set the height and width at 200, 200.     WinMove($hWnd, "", 0, 0, 200, 200)     ; Wait for 2 seconds to display the new position of the Notepad window.     Sleep(2000)     ; Move the Notepad window back to the original position by using the array returned by WinGetPos.     WinMove($hWnd, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3])     ; Wait for 2 seconds to display the original position of the Notepad window.     Sleep(2000)     ; Close the Notepad window using the handle returned by WinWait.     WinClose($hWnd) EndFunc   ;==>Example
转载请注明原文地址: https://www.6miu.com/read-3578.html

最新回复(0)