Change application window style
I am running IE as a process and then I would like to change the following properties of the application.
- remove title bar, application toolbar (if IE)
- set top, left position and size using c #
-
Prevent the process from minifying, I used the following code but no luck (find the process handle and then pass it below the 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 from being used and not show it on the taskbar
a source to share
remove title bar, process toolbar (if IE)
The terminology here is not entirely correct. The title bar or toolbar refers to the window, not the process. And the window "belongs" to the process in the sense that the 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:
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd) & ~WS_CAPTION);
set top, left location and size using c #
SetWindowPos can do both
prevents process minimization ...
a window , not a process, you can't, well, you can remove the controls from the title bar, but that will also remove the maximize and close if you want the WS_SYSMENU lookup
a source to share
It sounds like you want to use Internet Explorer Kiosk Mode , which provides a full-screen, tool-free, barrier-free window.
Please check the previous link for more information and please vote :)
a source to share
Just think: It would help if you didn't start IE as a separate process (basically: by opening a browser and completely freeing it from your control), but use a form in your C # app that you control - size, location, no header , no minification - with (just?) a WebBrowser control over it? WebBrowser is basically just IE, but as a control over your form that you have (close) full control over.
a source to share