Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive Hide/Show of window #84

Open
wvdvegt opened this issue Feb 19, 2018 · 1 comment
Open

Excessive Hide/Show of window #84

wvdvegt opened this issue Feb 19, 2018 · 1 comment

Comments

@wvdvegt
Copy link

wvdvegt commented Feb 19, 2018

Hi

When running evemon on a tablet (in tablet mode so with a fullscreen start menu, evemon hides and shows it's mainwindow a large number of times leading (whenever a character tile is added/updated it seems).

This leads to evemon disappearing and the windows menu to show (which looks quite annoying).

@wvdvegt
Copy link
Author

wvdvegt commented Feb 20, 2018

It can be fixed by swapping code for this.SuspendDrawing() and this.ResumeDrawing() in LayoutTabPages of MainWindow.cs. SuspendDrawing is more for Controls and not for Forms.

        [DllImport("user32.dll")]
        public static extern bool LockWindowUpdate(IntPtr hWndLock);

        private void LayoutTabPages() {        
                LockWindowUpdate(Handle);

                try {
                        // code
                } finally {
                        // code
                        LockWindowUpdate(IntPtr.Zero);
                }
        }

Does a much better (quieter) job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant