tags:

views:

271

answers:

4

I start IE as a process and then i would like to change the following properties of a application.

  1. remove title bar, toolbar of a application(if IE)
  2. set top,left location and size through c#
  3. 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

+2  A: 

Sounds like you want to use Internet Explorer's Kiosk Mode, which provides a full screen, toolbarless, non-minimizable window.

Please check the preceeding link for more information and, er, vote me up :)

Mark
thanks @mark. how do change the location and size
JKS
you can't, when in kiosk mode the window is maximized! maybe you should give more attention to an answer first?
Ion Todirel
+1  A: 

Here's an SO answer I gave on changing the style of a window. (It's in VB.NET so you'll have to translate, but it should help you get the idea.)

Zach Johnson
+1  A: 

remove title bar, toolbar of a process (if IE)

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:

SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd) & ~WS_CAPTION);

set top,left location and size through c#

SetWindowPos can do both

prevent process from minimizing...

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

Ion Todirel
A: 

Just a thought: would it help if you did not start IE as a separate process (basically: opening a browser and releasing it out of your control completely), but use a form in your C# application that you control - size, location, no title bar, no minimizing allowed - with (just?) a WebBrowser control on it? The WebBrowser is basically just IE anyway but then as a control on your form, that you have (near) total control over.

peSHIr
i like your idea but already i tried it. my application consumes too much memory to render a website. so i tried with an external application
JKS