I start IE as a process and then i would like to change the following properties of a application.
- remove title bar, toolbar of a application(if IE)
- set top,left location and size through c#
-
prevent process from minimizing , i have used the following code but had no luck(find the handle of the process and then pass it to below function)
public void SetFormOnDesktop(int hwnd) { int hwndf = hwnd; IntPtr hwndParent = FindWindow("ProgMan", null); SetParent(hwndf, hwndParent); }
EDIT 1:
Is it possible to prevent IE context menu and prevent it from showing on taskbar
The terminology is not quite right here. A title bar or a toolbar belongs to a window, not a process. And a window “belongs” to a process, in the sense that a process can call CreateWindow.
Now, to remove the title bar remove the WS_CAPTION style from the window, to do so you can call SetWindowLong with the GWL_STYLE flag and use the tilde operator to remove it:
SetWindowPos can do both
window, not process, you can’t, well you can kind of remove the controls from the title bar, but that removes maximize and close as well, if you want that look for WS_SYSMENU