Hi
Anyone know how to get the MDI form to cover the startmenu? I know how to get a normal form to cover it, but I can't get the MDI form to cover it... and is there a way to get rid of the border aswell?
thanks
Printable View
Hi
Anyone know how to get the MDI form to cover the startmenu? I know how to get a normal form to cover it, but I can't get the MDI form to cover it... and is there a way to get rid of the border aswell?
thanks
'as for the border...midi forms have no border properyCode:
'bas module code
Option Explicit
'this will give you full screen without
'have to hide taskbar
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 Long
Public Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Public Const HWND_TOP = 0
Public Const SWP_SHOWWINDOW = &H40
'MDIForm code
Option Explicit
Private Sub MDIForm_Activate()
Dim cx As Long
Dim cy As Long
Dim RetVal As Long
' Determine if screen is already maximized.
If Me.WindowState = vbMaximized Then
' Set window to normal size
Me.WindowState = vbNormal
End If ' Get full screen width.
cx = GetSystemMetrics(SM_CXSCREEN) ' Get full screen height.
cy = GetSystemMetrics(SM_CYSCREEN)
' Call API to set new size of window.
RetVal = SetWindowPos(Me.hwnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW)
End Sub
'so you are stuck with it
Thanks...