Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



showwindow fullscreen windows 7


Home  > VB.NET  > showwindow fullscreen windows 7 
       
showwindow fullscreen windows 7

        public System.Drawing.Color colorActiveColor = System.Drawing.Color.Black;
        private const int SW_HIDE = 0;
        private const int SW_SHOW = 1;

        [DllImport("user32.dll")]
        private static extern int FindWindow(string className, string windowText);
        [DllImport("user32.dll")]
        private static extern int ShowWindow(int hwnd, int command);
        [DllImport("user32.dll")]
        private static extern int EnableWindow(int hwnd, bool command);
        [DllImport("user32.dll")]
        private static extern int FindWindowEx(int hwndParent, int hwndChildAfter, string className, string windowText);
        [DllImport("user32.dll")]
        private static extern int GetDesktopWindow();
        
        int hwndParent = 0;
        int hwnd = 0;
        public void FullScreen()
        {

            HideStartMenu();
            menuStrip1.Visible = false;
            statusStrip1.Visible= false;
            frmMain.ActiveForm.TopMost = true;
            frmMain.ActiveForm.FormBorderStyle = FormBorderStyle.None;
            frmMain.ActiveForm.WindowState = FormWindowState.Maximized;
            panelMain.BackColor = System.Drawing.Color.Black;
            panelMain.Dock = DockStyle.Fill;
            
        }


        public void Normal()
        {

            menuStrip1.Visible = true;
            statusStrip1.Visible = true;
            frmMain.ActiveForm.WindowState = FormWindowState.Normal;
            frmMain.ActiveForm.FormBorderStyle = FormBorderStyle.Fixed3D;
            frmMain.ActiveForm.TopMost = false;
            panelMain.BackColor = colorActiveColor;
            panelMain.Dock = DockStyle.Fill;
            ShowStartMenu();
        }

        public void HideStartMenu()
        {
            hwndParent = FindWindow("Shell_TrayWnd", "");
            hwnd = FindWindowEx(GetDesktopWindow(), 0, "BUTTON", "Start");
            ShowWindow(hwndParent, SW_HIDE);
            ShowWindow(hwnd, SW_HIDE);

        }

        public void ShowStartMenu()
        {
            hwndParent = FindWindow("Shell_TrayWnd", "");
            hwnd = FindWindowEx(GetDesktopWindow(), 0, "BUTTON", "Start");
            ShowWindow(hwndParent, SW_SHOW);
            ShowWindow(hwnd, SW_SHOW);
        }

ASP / VB .NET Get The State Of the Current Thread and check if its running

Configuration Manager Not found in IDE of Visual Studio .NET 2005

Debug Problem WebService Visual Studio 2005 The breakpoint will not be hit No symbol has been loaded for this document

index

Invoke or BeginInvoke cannot be called on a control until the window handle has been created.

VB .NET Delay The TextChanged Event of a TextBox using Timer Control

VB .NET How to Create XML Files with fields Dynamically

VB .NET Timer Control delay or Interval in milliseconds

VB .NET TreeNode Display Image or icon in a TreeView Control

VB .NET WinForm How to Pass a Paramter to a Thread

VB .NET Winform Make a TreeNode Invisible or Hide a TreeNode in a TreeView Control

VB .NET Sort a combobox xml datasource

.net temporarily disable an event handler

showwindow fullscreen windows 7

.net double click show full window

.net hide windows 7 start menu

.net winform statusstrip separator

Implement Keyboard Shortcut in Windows

dynamic call a function

dynamically call a functino in .net

.NET Display a form



  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam