WinForm Within Start Menu Area

Posted on 2011-10-27
Medium Priority
Last Modified: 2012-05-12
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:

        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);

        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;
                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
Question by:freezingHot
1 Comment

Accepted Solution

freezingHot earned 0 total points
ID: 37041902
fixed by setting the start menu (taskbar) to "auto-hide."  once i did that, the form expanded over the taskbar area.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month16 days, 1 hour left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question