大部分软件的主窗体启动之前,都有一个图标首窗体的启动,并且图标窗体与主窗体共存一段时间,您可以打开excel亲身感受一下。
option explicit
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 窗口置顶
const swp_showwindow = &h40 ‘显示窗体
const swp_nosize = &h1 不允许改变大小
private sub form_load()
设置窗体永远置顶
setwindowpos me.hwnd, hwnd_topmost, me.top, me.left, me.width, me.height, swp_nosize or swp_showwindow
end sub
time1 and time2 配合达到延时效果
private sub timer1_timer()
timer2.enabled = true
mdiform1.show
end sub
private sub timer2_timer()
unload me
end sub
private sub form_keydown(keycode as integer, shift as integer)
unload me
mdiform1.show
end sub
private sub image1_click()
unload me
mdiform1.show
end sub