[英]How to show message box without console or form in background?
我是編程(c#)的新手。 我在VBScript中看到過,我們可以顯示消息框(獨立)。 我想在C#中這樣做,只是為了學習,但是執行時的代碼在后台顯示控制台或窗體以及消息框。 執行程序時是否只能顯示消息框?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ConsoleApp4
{
class Program
{
static void Main(string[] args)
{
MessageBox.Show("My message");
}
}
}
對於控制台項目,可以隱藏控制台,如下所示:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.