如何在从套接字接收数据后在c#代码中显示消息? [英] how to show message in c# code after Recieve Data from socket ?
本文介绍了如何在从套接字接收数据后在c#代码中显示消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是c#编程的新手..
如何在c#中显示消息框。我希望我点击按钮显示消息按钮点击
谢谢你
I am new in c# Programming..
how to show message box in c#. i want i click on button its show message "Button Clicked"
Thanks you
推荐答案
MessageBox.Show(Hello Welcome to C# );
MessageBox.Show("Hello Welcome to C#");
在按钮单击事件处理程序中:
In the button click event handler:
MessageBox.Show("Button Clicked!");
// MessageBox.Show的最简单重载。 [1]
//
MessageBox.Show(Dot Net Perls太棒了。);
//
//带有文本和标题的对话框。 [2]
//
MessageBox.Show(Dot Net Perls真棒。,
重要消息);
//
//带有两个按钮的对话框:是和否。 [3]
//
DialogResult result1 = MessageBox.Show(Dot Net Perls真棒吗?,
重要问题,
MessageBoxButtons.YesNo);
//
//带问号图标的对话框。 [4]
//
DialogResult result2 = MessageBox.Show(Dot Net Perls真棒吗?,
重要查询,
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question);
// The simplest overload of MessageBox.Show. [1]
//
MessageBox.Show("Dot Net Perls is awesome.");
//
// Dialog box with text and a title. [2]
//
MessageBox.Show("Dot Net Perls is awesome.",
"Important Message");
//
// Dialog box with two buttons: yes and no. [3]
//
DialogResult result1 = MessageBox.Show("Is Dot Net Perls awesome?",
"Important Question",
MessageBoxButtons.YesNo);
//
// Dialog box with question icon. [4]
//
DialogResult result2 = MessageBox.Show("Is Dot Net Perls awesome?",
"Important Query",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question);
这篇关于如何在从套接字接收数据后在c#代码中显示消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文