cnks 发表于 2004-9-18 16:53:00

请问怎么样能让自己设计的窗体显示在最前方?

请问怎么样能让自己设计的窗体显示在最前方?就是在窗体显示的同时还可以用别的工具或者命令,是不是要用到api函数,不知道怎么样用?

ntchjie 发表于 2004-9-18 21:08:00

Option Explicit<BR>Const HWND_TOPMOST = -1<BR>Const SWP_NOSIZE = &amp;H1<BR>Const SWP_NOMOVE = &amp;H2<BR>Private Declare Sub 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)<BR>Private Sub Form_Load()<BR>                       SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE<BR>End Sub
页: [1]
查看完整版本: 请问怎么样能让自己设计的窗体显示在最前方?