Hiding the SIP button

  • Thread starter Thread starter Nathan Mellor
  • Start date Start date
N

Nathan Mellor

The main form of my application doesn't need the SIP button for any input.

I'd like to disable it rather than put a bunch of dynamic resizing into the
form to satisfy Mobile2Market requirements.

I was given this link to a method call that might help me.

http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ/HidingTheStartIcon

I used this call with the SHFS_HIDESIPBUTTON option.

There's only one problem: it doesn't work. The SIP button occasionally goes
away for a while, but it reappears easily

Nathan
 
You need to call this every time your form loses and regains focus. you'll
need to call it on the Activated event for your form.

Peter
 
Makes sense, but it still doesn't go away. I've put this code in. I can tell
it is being called by debugging. But the SIP menu isn't going away.

Nathan
/// <summary>

/// Responds to the activated event to disable the SIP menu.

/// </summary>

/// <param name="e">Event Args - passed to base</param>

protected override void OnActivated(EventArgs e)

{

base.OnActivated (e);

Capture = true;

IntPtr hwnd = GetCapture();

Capture = false;

SHFullScreen(hwnd, SHFS_HIDESIPBUTTON);

}
 
Try putting the call to SHFullScreen into a separate function and calling it
from Activate and Resize events
 
Alex Feinman said:
Try putting the call to SHFullScreen into a separate function and calling it
from Activate and Resize events

Tried that. It's still there. Does this not work on a main form?

Nathan
 
Alex Feinman said:
Have you removed MainMenu control from this form?

I don't think I can remove the MainMenu Control without losing its four
useful submenus. If this is required to get rid of the SIP button, then I
guess that answers my question of whether I can do it on this form: nope.

Nathan
 
Back
Top