代码如下:
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long,ByVal hWndInsertAfter As Long,& _
ByVal X As Long,ByVal Y As Long,ByVal cx As Long,ByVal cy As Long,ByVal wFlags As Long) As Long & _
Const HWND_TOPMOST = -1
Private Sub Form_Load() SetWindowPos Me.hwnd,HWND_TOPMOST,Me.Left/Screen.TwipsPerPixelX,_ Me.Top/Screen.TwipsPerPixelY,Me.Width/Screen.TwipsPerPixelX,_ Form1.Height / Screen.TwipsPerPixelY,0 End Sub
原文链接:https://www.f2er.com/vb/262364.html