Public 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 Longsub form_load() SetWindowPos me.hwnd, -1, 0, 0, 0, 0, 3 end subsub timer1_timer() formm2.show unload me end sub
api函数:setwindowpos,使启动窗体处于最顶层。然后用timer控件判断显示时间。
SetWindowPos me.hwnd, -1, 0, 0, 0, 0, 3
end subsub timer1_timer()
formm2.show
unload me
end sub