How to disable the start button?

F

flik

hello,

I want to disable the start button, so that the user cannot click on it.
I'am using a pocket pc with windows mobile 5 (and cf 2.0).

I already found some examples but all are using "SHFullScreen(hwnd,
SHFS_HIDESTARTICON)". But this doesn't work for me...
.... I don't know why but the start button stays enabled.

The problem is that the user have to use the "ok" button on the upper
right. That's why I cannot disable the _taskbar_!

Any help appreciated,

thx flik
 
A

ackesa

Hello,

I'm using the following code to hide/show the Taskbar and the
Taskmanager. Don't forget to call the ShowTaskbar before closing your
application.

//------ Hide/Show Taskbar and Taskmanager
private const int SW_HIDE = 0x00;

private const int SW_SHOW = 0x0001;

[DllImport("coredll.dll", CharSet = CharSet.Auto)]

private static extern IntPtr FindWindow(string lpClassName,
string lpWindowName);

[DllImport("coredll.dll", CharSet = CharSet.Auto)]

private static extern bool ShowWindow(IntPtr hwnd, int
nCmdShow);

[DllImport("coredll.dll", CharSet = CharSet.Auto)]

private static extern bool EnableWindow(IntPtr hwnd, bool
enabled);

private static void ShowTaskbar()
{

IntPtr h = FindWindow("HHTaskBar", "");

ShowWindow(h, SW_SHOW);

EnableWindow(h, true);

}

private static void HideTaskbar()
{

IntPtr h = FindWindow("HHTaskBar", "");

ShowWindow(h, SW_HIDE);

EnableWindow(h, false);

}

SabineA
 
F

flik

hello sabine,

thank you very much for your posting.
This is exactly what I have looked for!

thx

flik
 

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