Search code examples
javascriptpopupmessagemessagebox

use javascript away from HTML and Internet-Browsers and make a pop-up message


I was following THIS tutorial, where it's shown how to make your js-file into an exe.

My first *.exe was just print("hello world"). I succeeded easily, we all did that at one time.

The next thing that I wanted to do was a pop-up window (maybe with a button).

There I realized when googling for methods it was all in HTML / Web context. And that the window object is somehow generated inside the ??browser??

How can I get a popup Message without any Browsers and HTML files.

Can I use js and stay miles away from Web and HTML? Is there any js resources without any embeddedness in HTML.

Hope my question is clear enough.


Solution

  • you can get input and show message box :

    import System.Windows.Forms;
    import Microsoft.VisualBasic;
    var input = Interaction.InputBox("Question?","Title","Default Text");
    MessageBox.Show(
         "input: " + input,
          "title",
         MessageBoxButtons.OK,
         MessageBoxIcon.Exclamation
    );