Windows 8 and 8.1 Forums

Controlling Charms...

  1. #1

    Controlling Charms...

    After an initial attempt here at getting to grips with the Charms bar being an intrusion... I dug a bit deeper and did some alternate coding on disabling Charms...(primarily as the current solution causes a flash of the foreground window's title bar when Charms gets hidden)

    First I tried killing the Charms process itself - but Windows explorer went nuts and restarted itself (with Charms - further proof that Charms is fully integrated therein)

    I have thus far not found a way to deactivate Charms without some negative effect .. I recoded the method to hide the Charms bar but this removes focus from the foreground window and requires adddition user interaction (tap/click the current window to re-focus)

    See the code below... NB: uncommenting the SendMessage line (and commenting out the SetWindowsPos line gives the flash effect - i.e moves focus back to the initial window)

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using System.Runtime.InteropServices;
    using System.Diagnostics;
    using System.Windows.Forms;
    namespace NoCharm
       class Program
            [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]
            static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName);
            [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
            private static extern short GetKeyState(int keyCode); // Will be used to re-enable Win+C
            [DllImport("user32.dll", CharSet = CharSet.Auto)]
            public static extern int SendMessage(IntPtr hWnd,int msg, int wParam, int lParam);
            [DllImport("user32.dll", EntryPoint = "SetWindowPos")]
            static extern bool SetWindowPos(
                 int hWnd,             // Window handle
                 int hWndInsertAfter,  // Placement-order handle
                 int X,                // Horizontal position
                 int Y,                // Vertical position
                 int cx,               // Width
                 int cy,               // Height
                 uint uFlags);         // Window positioning flags
            public const int WM_SYSCOMMAND = 0x0112;
            public const int SC_CLOSE = 0xF060;
            public const int SC_MINIMIZE = 0xF020;  //used with WM_SYSCOMMAND has the same effect as SetWindowPos and SMP_NOMOVE  
            public const uint SWP_NOMOVE = 0x0002 ;
             static void Main(string[] args)
                        while (true)
                           IntPtr hWndCharmBar = FindWindowByCaption(IntPtr.Zero, "Charm Bar");
                           IntPtr hWndCharmClock = FindWindowByCaption(IntPtr.Zero, "Clock and Date");
                           SetWindowPos((int)hWndCharmBar,0, 0, 0, 0, 0, SWP_NOMOVE);
                           //SendMessage(hWndCharmClock, WM_SYSCOMMAND, SC_CLOSE, 0);
                           //SendMessage(hWndCharmBar, WM_SYSCOMMAND, SC_CLOSE, 0);
                           Thread.Sleep(10); // sleep to save CPU resources... uses 0% CPU and 1.7 MB RAM
                catch (Exception ex)
    Download binary.

      My System SpecsSystem Spec

  2. #2

    Posts : 4,515
    Vista and Win7
      My System SpecsSystem Spec

  3. #3

    Ya that's the basic stuff... there are drivers that do not disable the right swipe...
      My System SpecsSystem Spec

Controlling Charms...

Similar Threads
Thread Forum
Controlling a W7 desktop using a W8.1 tablet (Teamviewer)
I have a Dell Venue 8 Pro if it changes anything. It works perfectly and I see my remote screen just fine. There is only a small detail that ruins my experience. How can I send that damn "Windows/Start key" to the remote computer? It is not on any of my tablet keyboards either! ...
Drivers & Hardware
Is there a good method for controlling music in-game?
Hello, I'm CrazyKilla. I play a lot of games and have a set of buttons on my keyboard which can regulate sound such as increase and decrease volume, pause and play and change songs. These buttons do not work on some games (e.g. Skyrim) and they do on some games (e.g. Counter-Strike GO). I'm fine...
Please help. Trying to get rid of the charms bar.
Hi. I have a new acer inspire that has windows 8 on it. It has been driving my insane and making me very stressed just trying to fit windows 8 to work on a PC platform, I've considered returning it but I am in need of a computer for my studies and I don't know if I will get a full refund. I have...
Stop Windows remote Controlling iTunes?
I purchased a GMYLE Windows media remote to control dvd software on my computer which works fine but the remotes nav, play and pause buttons etc also at the same time controls iTunes, is there a way to stop the remote controlling iTunes? Just some info, obviously it does not happen when iTunes...
Network & Sharing
remote controlling windows 8 laptop
I keep my laptop with standard windows 8 on. But when I go out, I would like to remote control laptop using ipad or android tablets. I tried teamviewer. It makes lot of data traffic. But I am not sure whether that is optimal compared to other free remote control softwares available. I tried...
Network & Sharing
Documentation on controlling the LED light on a win8 tab
Trying to add a feature to a win8 app. Turns on and off the led light on win8 tablet. An hour of search yield absolutely no documentation on this. And not a single result from a google search for any mentioning of this. And there is zero app in the winstore for this. Can anyone link me to...
Software and Apps

Eight Forums Android App Eight Forums IOS App Follow us on Facebook