VB 置於最上層

2021-04-01 00:47:43 字數 592 閱讀 7761

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

private const hwnd_topmost = -1

private const swp_showwindows = &h40

private sub ***mand1_click()

unload me

end sub

private sub form_load()

dim retvalue as long

retvalue = setwindowpos(me.hwnd, hwnd_topmost, ((screen.width / screen.twipsperpixelx) - 480) / 2, 0, 480, 64, swp_showwindows)

end sub