Results 1 to 3 of 3

Thread: [RESOLVED] setwindowlong hide menubar

  1. #1

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Resolved [RESOLVED] setwindowlong hide menubar

    how can i remove the menubar from an embedded application?

    heres what i have so far, which removes the titlebar:

    vb Code:
    1. Dim proc As New Diagnostics.Process
    2. proc.StartInfo.FileName = "calc.exe"
    3. proc.Start()
    4. proc.WaitForInputIdle()
    5. SetParent(proc.MainWindowHandle, Me.Panel2.Handle)
    6. SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0)
    7. InitialStyle = GetWindowLong(proc.MainWindowHandle, GWL_STYLE)
    8. SetWindowLong(proc.MainWindowHandle, GWL_STYLE, InitialStyle And Not WS_BORDER)

  2. #2
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: setwindowlong hide menubar

    Can't you move it up so that it's out of view? If it doesn't have a title bar then it can't be moved (right?) so the user should never be able to see the menu. That might require some tinkering though... what if the user has a larger font and the menu is bigger? lol.

    Otherwise I've no idea, but I don't think you'd get it using the API's you're using now, as (I think) they deal with the windows themselves, not their contents.

  3. #3

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: setwindowlong hide menubar

    thanks for the suggestion.
    eventually i opted to offset the top + remove the menus using the GetMenu + RemoveMenu API functions.

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