如何让窗体启动后位于屏幕的右下角
<P>谢谢。</P> 用VB将窗体做成Dll <P>我说的窗体启动是指的UserForm .show以后,不是AutoCAD启动</P> <P>UserForm_Initialize()中:</P><P>with me</P>
<P> .top=400 </P>
<P> .left=400</P>
<P>end with</P>
<P> 调整下,启动时大概就是右下角了。</P> 在不同的显示器上分辨率并不一定相同,除了指定一个数以外,还有没有更好的方法? <P>我以为要放在工具栏的右边:)</P>
<P>可以先获取屏幕尺寸</P> 6楼斑竹说的对,先获得屏幕尺寸,再用4楼的方法做。。 lzh741206发表于2006-4-11 11:11:00static/image/common/back.gif
我以为要放在工具栏的右边:)
可以先获取屏幕尺寸
麻烦之处在于VBA里面没有Screen这个对象,获取屏幕尺寸有没有什么其它的途径呢?<BR> Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Sub UserForm_Click()
Dim a As RECT
GetWindowRect GetDesktopWindow, a
MsgBox a.Right - a.Left
MsgBox a.Bottom - a.Top
End Sub
多谢
页:
[1]