[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:
Dim proc As New Diagnostics.Process
proc.StartInfo.FileName = "calc.exe"
proc.Start()
proc.WaitForInputIdle()
SetParent(proc.MainWindowHandle, Me.Panel2.Handle)
SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0)
InitialStyle = GetWindowLong(proc.MainWindowHandle, GWL_STYLE)
SetWindowLong(proc.MainWindowHandle, GWL_STYLE, InitialStyle And Not WS_BORDER)
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.
Re: setwindowlong hide menubar
thanks for the suggestion.
eventually i opted to offset the top + remove the menus using the GetMenu + RemoveMenu API functions.