110,533
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Drawing.Printing;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
class HelloPrinter : Form
{
public static void Main()
{
Application.Run(new HelloPrinter());
}
[DllImport("user32.dll")]
public static extern int MessageBoxW(IntPtr hWnd, string text, string caption, uint type);
protected override void OnKeyPress(KeyPressEventArgs e)
{
string text = "text文本字符串";
string caption = "caption标题栏";
MessageBoxW(Handle, text, caption, 0);
}
}