Problem using SHFullScreen in C#

  • Thread starter Thread starter Jyoti Mahna
  • Start date Start date
J

Jyoti Mahna

Hi,

I am trying to use SHFullScreen in C# for hiding taskbar
and Start Icon using

[DllImport("aygshell.dll")]
private extern static bool SHFullScreen(IntPtr hWnd, long
dwState);

and calling
IntPtr hWnd = API.FindWindow(null,this.Text);
SHFullScreen(hWnd, SHFS_HIDESTARTICON | SHFS_HIDETASKBAR)

But when I call SHFullScreen, I get
A Managed NotSupportedException.

Pls suggest what can be the possible reason.

Regards,
Jyoti
 
You should change the dwState parameter from a long to an
int.

Regards,
Maarten Struys, eMVP
PTS Software bv
 
Back
Top