WPFTabTip icon indicating copy to clipboard operation
WPFTabTip copied to clipboard

Problem with Full Screen Application

Open dhpanteon opened this issue 7 years ago • 11 comments

When the application is in full screen mode (WindowState="Maximized", WindowStyle="None"). This library want work. it will first open the keyboard then automatically close it.

dhpanteon avatar Mar 29 '17 09:03 dhpanteon

@dhpanteon, what version of Windows are you using?

maximcus avatar Mar 29 '17 10:03 maximcus

Windows 10 Enterprise 32-bit.

dhpanteon avatar Mar 29 '17 10:03 dhpanteon

Most likely your issue is more about Windows 10 (see #2) then full-screen. Does everything work ok if your app not in full-screen mode?

maximcus avatar Mar 29 '17 10:03 maximcus

Yes it works but i need it in full screen mode. Even in my desktop full screen mode works fine. But in tablet it's not working.

dhpanteon avatar Mar 29 '17 10:03 dhpanteon

Your desktop and tablet have different versions of Windows?

maximcus avatar Mar 29 '17 10:03 maximcus

It's same.

dhpanteon avatar Mar 30 '17 05:03 dhpanteon

@dhpanteon, have you tried to find the problem in WPFTabTip source code and fix it yourself?

maximcus avatar Mar 30 '17 05:03 maximcus

Yes have gone through your code. I have found the Problem that, it's conflict with in-build behavior of opening Tab Tip keyboard. i guess First it will open OS Behavior keyboard then it'll open WPFTab Tip keyboard. This is only happening with Tab or Mini Pos with no keyboard attach.

dhpanteon avatar Mar 31 '17 05:03 dhpanteon

i have done some changes that solve my problem

public static void Open() { const string TabTipProcessName = "TabTip"; if (EnvironmentEx.GetOSVersion() == OSVersion.Win10) EnableTabTipOpenInDesctopModeOnWin10();

        if (Process.GetProcessesByName(TabTipProcessName).Count() == 0)
        {
           
            Process.Start(TabTipExecPath);
        }
        else
        {
            try
            {//Close Previously opened keyboard
                if (Process.GetProcessesByName(TabTipProcessName).FirstOrDefault() != null)
                    Process.GetProcessesByName(TabTipProcessName).FirstOrDefault().Kill();
            }

            catch //(Access Error)  Sometime it gives Access Problem 
            { }
            Task.Yield(); // wait for it to close the keyboard

          Process.Start(TabTipExecPath);
        }

        //MessageBox.Show(value.HasValue ? value.Value.ToString() : "null");
        //MessageBox.Show(Process.GetProcessesByName(TabTipProcessName).Count().ToString());
    }


    public static void OpenUndocked()
    {
        const string TabTipDockedKey = "EdgeTargetDockedState";
        const string TabTipProcessName = "TabTip";

        int docked = (int)(Registry.GetValue(TabTipRegistryKeyName, TabTipDockedKey, 1) ?? 1);
        if (docked == 1)
        {
            Registry.SetValue(TabTipRegistryKeyName, TabTipDockedKey, 0);
            foreach (Process tabTipProcess in Process.GetProcessesByName(TabTipProcessName))
            {
                //(Access Error)  Sometime it gives Access Problem 
                try { tabTipProcess.Kill(); } catch { }
            }
        }
        Open();
    }

dhpanteon avatar Mar 31 '17 05:03 dhpanteon

I had the same issue and corrected it with the above code. Thanks!

leshric avatar Jul 28 '17 18:07 leshric

I had the same issues on Windows 10 tablet and this code solved it! Thanks!

Cocotus avatar Aug 28 '17 22:08 Cocotus