question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MessageBox not closing in PowerShell

See original GitHub issue

First time user. I have a simple class created to display a Message box.

public class Msg : IDisposable
    {
        public Msg(string Message)
        {
            Application.Init();
            var msg = MessageBox.Query(20, 10, "Test", Message, "Yes", "No");
        }

        public void Dispose()
        {
            Console.Write("\u001b[?1h");
        }
    }

When I use the class from within PowerShell, the MessageBox opens but does not disappear once a option is chosen. What am I missing?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
wgrosscommented, Sep 18, 2020

Since this is a gui.cs<->Powershell issue/discussion…

I spiked a possible powershell integration for gui.cs at https://github.com/wgross/gui.ps1. I did this out of curiosity and don’t have a real-world application currently to drive further implementation but maybe it can serve as a stimulus or starting point for other people?

1reaction
tigcommented, Sep 22, 2020

I still don’t understand how that gap in mouse functionality still persists in the new Windows Terminal.

Me either: I guess they are working on it. This is tracked here: https://github.com/migueldeicaza/gui.cs/issues/332

Read more comments on GitHub >

github_iconTop Results From Across the Web

MessageBox not closing in PowerShell · Issue #885 · gui- ...
First time user. I have a simple class created to display a Message box. public class Msg : IDisposable { public Msg(string Message) ......
Read more >
Script which contains a Yes/No message box to close an ...
I am attempting to write a script that will display a message box with yes/no buttons. I am wanting “Yes” to close an...
Read more >
MessageBox not able to click "X" on the msgbox and ...
I have a message box that works perfectly fine, but I want to adjust my code to be able to cancel the script...
Read more >
Help with a form closing after a message box pop up
Help with a form closing after a message box pop up. Let me start by saying I am not a coder and don't...
Read more >
Auto close [System.Windows.Forms.MessageBox]::Show
PowerShell. Hi Team,. is there a option to make auto close when prompting a message box without pressing the ok button? [System.Windows.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found