Problem using SHFullScreen in C#

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
 
M

Maarten Struys eMVP

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

Regards,
Maarten Struys, eMVP
PTS Software bv
 

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