Disable the start-menu

  • Thread starter Thread starter Guest
  • Start date Start date
public static bool SetTaskBarEnabled(bool bEnabled)
{
IntPtr taskWindow=FindWindow("HHTaskBar", null);
if (taskWindow==IntPtr.Zero)
{
taskWindow=FindWindow("Shell_TrayWnd", null);
}
if (taskWindow!=IntPtr.Zero)
{
if (bEnabled)
return EnableWindow(taskWindow,true);
else
return EnableWindow(taskWindow,false);

}
return false;
}

[DllImport("coredll.dll")]
private static extern bool EnableWindow(IntPtr hwnd,bool bEnable);

[DllImport("coredll.dll")]
private static extern IntPtr FindWindow(string className, string
windowName) ;
 
GREAT JOB!!!

This is exactly what I want and it works!

In the mean time I heard from other developers that the GXOpenInput function
in MS's Game API can also do the same thing but I have not got that working
yet. Any ideas how to do that?

[DllImport("gx.dll", EntryPoint="#9")]
public static extern int GXOpenInput();

It always throw an exception when I call it in C#. Maybe the gx.dll can not
found?
Thanks a lot!




Dan Ardelean said:
public static bool SetTaskBarEnabled(bool bEnabled)
{
IntPtr taskWindow=FindWindow("HHTaskBar", null);
if (taskWindow==IntPtr.Zero)
{
taskWindow=FindWindow("Shell_TrayWnd", null);
}
if (taskWindow!=IntPtr.Zero)
{
if (bEnabled)
return EnableWindow(taskWindow,true);
else
return EnableWindow(taskWindow,false);

}
return false;
}

[DllImport("coredll.dll")]
private static extern bool EnableWindow(IntPtr hwnd,bool bEnable);

[DllImport("coredll.dll")]
private static extern IntPtr FindWindow(string className, string
windowName) ;

J said:
Hi there,

Is there a way to disable the Start-Menu for Pocket PC 2002?

Thanks!
 
After I put the gx.dll on the device the Game API worked too!

Thanks.


GREAT JOB!!!

This is exactly what I want and it works!

In the mean time I heard from other developers that the GXOpenInput function
in MS's Game API can also do the same thing but I have not got that working
yet. Any ideas how to do that?

[DllImport("gx.dll", EntryPoint="#9")]
public static extern int GXOpenInput();

It always throw an exception when I call it in C#. Maybe the gx.dll can not
found?
Thanks a lot!




Dan Ardelean said:
public static bool SetTaskBarEnabled(bool bEnabled)
{
IntPtr taskWindow=FindWindow("HHTaskBar", null);
if (taskWindow==IntPtr.Zero)
{
taskWindow=FindWindow("Shell_TrayWnd", null);
}
if (taskWindow!=IntPtr.Zero)
{
if (bEnabled)
return EnableWindow(taskWindow,true);
else
return EnableWindow(taskWindow,false);

}
return false;
}

[DllImport("coredll.dll")]
private static extern bool EnableWindow(IntPtr hwnd,bool bEnable);

[DllImport("coredll.dll")]
private static extern IntPtr FindWindow(string className, string
windowName) ;

J said:
Hi there,

Is there a way to disable the Start-Menu for Pocket PC 2002?

Thanks!
 
Back
Top