How to hide the SIP icon?

G

Guest

Hi

I have a form with no MainMenu control but the SIP icon is still visible
whenever the application is started. Is there I way to remove it?

I have searched around and found that using SetWindowPos solves the problem.
However this only works on Pocket PC 2003, it does not work on WM5.0.

I have tried SHFullScreen but never got it to work.

Thanks

Gavin
 
D

David D Webb

There is some definite issues with hiding the sip button in Windows Mobile
5.0. Is the whole menu bar showing up or just a phantom SIP icon? If you
have been messing with the unmanaged calls, soft reset your device. WM5 can
get weird with the SIP after messing with those calls.

If you don't have a Menu control or a sip control on the form, you shouldn't
see the button. But there are plenty of cases where this is not true. I
finally gave up and added a menu control on most forms and used the 2 menu
options as my save/cancel buttons. The problem is if you are trying to make
an app compatible with PPC2003 and WM5, it looks really bad on the PPC2003
devices.

The following code used to work on PPC2003, but haven't had much luck with
it in WM5.

[DllImport("coredll.dll")]
public static extern IntPtr GetCapture();
public static void HideSip(Form curForm)
{
try {
int SHFS_HIDESIPBUTTON = 0x8;
curForm.Capture = true;
IntPtr hwnd = GetCapture();
curForm.Capture = false;
SHFullScreen(hwnd, SHFS_HIDESIPBUTTON);
} catch {
// Do Nothing
}
}

-Dave
 
G

Guest

Dave, can you tell me what weird results you are getting? I have no menu bar
and no SIP but the SIP icon still appears (tapping on it twice will remove
it). After adding the code below I was after having trouble with VS 2005,
sometimes starting debug nothing happens, just shows the busy cursor on my WM
5.0 device. I’ll have to stop debug and try again, didn’t think it was the
SIP code causing the problem until your reply!

‘To hide the SIP
Dim hWnd As IntPtr = FindWindow(Nothing, "MS_SIPBUTTON
SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_HIDEWINDOW)

‘To show the SIP again
Dim hWnd As IntPtr = FindWindow(Nothing, "MS_SIPBUTTON")
SetWindowPos(hWnd, HWND_BOTTOM, Screen.PrimaryScreen.Bounds.Width - 36,
Screen.PrimaryScreen.Bounds.Height - 25, 36, 24, SWP_SHOWWINDOW)

Anyway I have removed the code since it does not work on WM 5.0 devices.
It’s not too bad for me as the user has to log on first using another form
(that has a menu bar and SIP control) before returning to the main form
without the SIP and menu bar. This sequence will automatically remove the SIP
icon. Not ideal but until there is a solution...

Gavin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SIP at the bottom 2
How to Hide SIP button? 3
SIP without Menuber problem. 1
Enable SIP with Windows Mobile 5.0 1
SIP Issues 3
FullScreen + SIP + TabControl 2
SIP 7
hide sip options 4

Top