Results 1 to 5 of 5

Thread: TitleBar action

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Southbridge, MA, USA
    Posts
    40

    Post

    What I am attempting to do is eliminate the possibility of the operator closing, minimizing, or resizing my application.

    I have managed to get rid of the Minimize/Maximize/Close behavior of the MDIform menu and buttons with this little bit of code
    hSysMenu = GetSystemMenu(Me.hWnd, 0)
    For intCounter = 8 To 0 Step -1
    lReturn = RemoveMenu(hSysMenu, intCounter, MF_BYPOSITION)
    Next intCounter

    Then I discovered that if I double-clicked the titlebar, lo' and behold, the form resized itself. And, of course, I could no longer resize it back to normal.

    Any ideas on what to do to trap and disable this behavior?
    Thanks in advance,
    --Carl

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Posts
    123

    Post

    Hmm, I think that you can change the BorderStyle property to 0-None. That should work. I might be wrong.

  3. #3
    Lively Member
    Join Date
    Jan 2000
    Posts
    123

    Post

    Ah, forget it! I am stupid! I forgot you were using a Mdi form!

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    here is a simple way, the window resizes then maximizes right away, but it does the job...

    Code:
    Private Sub MDIForm_Resize()
        If Me.WindowState <> vbMinimized Then
            Me.WindowState = vbMaximized
        End If
    End Sub

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Southbridge, MA, USA
    Posts
    40

    Post

    Thanks. It looks a little ugly, but it does the trick.

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