Results 1 to 3 of 3

Thread: MDIForm to cover Start-menu. How?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    10
    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
    martin

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    '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
    'as for the border...midi forms have no border propery
    'so you are stuck with it
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    10

    Talking Thank you

    Thanks...

    martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width