用一个api即可实现窗口全屏显示,如下:
Const GWL_STYLE = (-16)
Dim trect As RECT, tmpstyle As Long
trect.left=0
trect.top=0
trect.right=screen.width/15-1
trect.bottom=screen.height/15-1
tmpstyle = GetWindowLong(Form1.hwnd, GWL_STYLE)
Call AdjustWindowRect(trect, tmpstyle, 0)
Form1.Left = trect.Left * 15
Form1.Top = trect.Top * 15
Form1.Width = (trect.right - trect.Left) * 15
Form1.Height = (trect.bottom - trect.Top) * 15
窗体 设置为无边框,运行时窗体最大化,这样就会覆盖任务栏。