SIP disappears after MessageBox.Show

W

Wade

Hi all,

I have the following code:

string message = "You have just completed this section. Fill
it with a background color?";
string caption = "Fill Section";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result;

result = MessageBox.Show(message, caption, buttons,
MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);

if (result == DialogResult.Yes)
{
// do something
}

After the user clicks okay, the SIP keyboard icon disappears. What's up
with that?

I've searched these groups, and the standard response is "add a main menu".
Well, I have a main menu. And, as I'm not using ShowDialog to open another
form, but rather Messagebox.Show, there's no way to add a menu to the dialog
box.

Any one have any clues? This is very frustrating.

Thanks for your help!

Wade
 
W

Wade

I am even trying to do the following, to no avail:

this.Capture = true;
IntPtr hwnd = Win32.GetCapture();
this.Capture = false;

Win32.SHFullScreen(hwnd, Win32.SHFS_SHOWSIPBUTTON);

....

class Win32
{

public const int SHFS_HIDESIPBUTTON = 0x8;
public const int SHFS_SHOWSIPBUTTON = 0x4;

[DllImport("aygshell.dll")]
public static extern bool SHFullScreen(IntPtr hwnd, int flags);

}

Thoughts? Any and all help is VERY much appreciated.
 
W

Wade

So, after nearly an hour of this frustration, I reset the PDA. And, of
course, as soon as I tried it again it worked perfectly fine.

Seems to me that the SIP isn't to be trusted. I'm going to have to watch it
like a hawk ...

(This is Windows Mobile 5.0, btw ...)

Wade said:
I am even trying to do the following, to no avail:

this.Capture = true;
IntPtr hwnd = Win32.GetCapture();
this.Capture = false;

Win32.SHFullScreen(hwnd, Win32.SHFS_SHOWSIPBUTTON);

...

class Win32
{

public const int SHFS_HIDESIPBUTTON = 0x8;
public const int SHFS_SHOWSIPBUTTON = 0x4;

[DllImport("aygshell.dll")]
public static extern bool SHFullScreen(IntPtr hwnd, int flags);

}

Thoughts? Any and all help is VERY much appreciated.

Wade said:
Hi all,

I have the following code:

string message = "You have just completed this section.
Fill it with a background color?";
string caption = "Fill Section";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result;

result = MessageBox.Show(message, caption, buttons,
MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);

if (result == DialogResult.Yes)
{
// do something
}

After the user clicks okay, the SIP keyboard icon disappears. What's up
with that?

I've searched these groups, and the standard response is "add a main
menu". Well, I have a main menu. And, as I'm not using ShowDialog to
open another form, but rather Messagebox.Show, there's no way to add a
menu to the dialog box.

Any one have any clues? This is very frustrating.

Thanks for your help!

Wade
 
A

A Loster By

.... mmmmm, Wade, you know what?

It may not be that simple as soft (or hard) reset the ppc... (in fact it's even easier!!!)

That expecific problem almost cause some partner and me several hours of sleping...

We where desperated and the answer: "add a menu bar and it's done!" was not enough...

But eventually, we find out that if you have some menu items in you menu bar, and after the message box was dismised; you click any of those menu items, not necesarilly for do something, just existing... the SIP comes back over...

So, the short answer: you may reassign the main menu to the form just after the message box call... like this:

Me.Menu = Me.[name_of_your_main_menu]

.... just one more thing: if you have a toolbar and some buttons on it, you may need yo do something more... to remove it from the controls collection of the form and do the main menu thing and later add once again the tool bar...:

Me.Controls.Remove(Me.[name_of_your_tool_bar])
Me.Menu = Me.[name_of_your_main_menu]
Me.Controls.Add(Me.[name_of_your_tool_bar])

well, that's pretty much it... That should work just fine...

(just in case, we're working with VS2005, CF 2.0)
 

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

Top