WinForm Within Start Menu Area

Hi - I need some help with winforms within c# using VS 2010.

i am creating a kiosk application and my desktop size is 1024 x 600.

i need to have my winform take the screen area that the start menu typically uses - or some how limiting the users ability to click inside of the "blank" area cause by the missing portion of the start menu.

 i remove the start menu area by using the following commands:

        [DllImport("user32.dll")]
        private static extern IntPtr FindWindowEx(IntPtr parentHwnd, IntPtr childAfterHwnd, IntPtr className, string windowText);

        [DllImport("user32.dll", SetLastError = true)]
        private static extern System.IntPtr FindWindow(string lpClassName, string lpWindowName);

        [DllImport("user32.dll")]
        private static extern int ShowWindow(IntPtr hwnd, int command);

        public const int SW_HIDE = 0;
        public const int SW_SHOW = 1;

        public static void ToggleTaskbar(int setting, out string Error)
        {
            Error = string.Empty;
            try
            {
                IntPtr taskBarWnd = FindWindow("Shell_TrayWnd", null);
                IntPtr hwndOrb = FindWindowEx(IntPtr.Zero, IntPtr.Zero, (IntPtr)0xC017, "Start");   //0xC017 forces element to be treated as ATOM
                ShowWindow(hwndOrb, setting);
                ShowWindow(taskBarWnd, setting);
            }

            catch (Exception ex)
            {
                Error = ex.Message;
            }
        }


any help would be appreciated.... thanks
LVL 1
freezingHotAsked:
Who is Participating?
 
freezingHotAuthor Commented:
fixed by setting the start menu (taskbar) to "auto-hide."  once i did that, the form expanded over the taskbar area.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.