本文介绍了JOptionPane是否等效于C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中,标准的Swing库中有一个有用的类,称为"JOptionPane",它提供了一堆预制的但可自定义的窗口,用于显示消息和获取(简单的)用户输入.

In Java there's a useful class in the standard Swing libraries called 'JOptionPane' that provides a bunch of pre-made but customizable windows for displaying messages and getting (simple) user input.

我知道有一个"MessageBox.Show(..)"用于以C#向用户显示是/否/取消类型的消息,但是是否有一个等效的类(或简单的库)提供了易于使用的可自定义输入盒子?

I know there's 'MessageBox.Show(..)' to display Yes/No/Cancel type messages to the user in C#, but is there an equivalent class (or simple library) that provides easy-to-use customizable input boxes?

类似于可用的功能来自 JOptionPane 是我的意思我在寻找.

Something like the functionality available from JOptionPane is what I'm looking for.

推荐答案

从Windows Vista开始,有任务对话框 api.

As of windows vista, there is the taskdialog api.

这是os功能,而不是c#库,从这个意义上说,这不是您所要求的.但是它大致涵盖了相同的领域:功能更强大的messagebox api,使您不必手动布局简单的对话框.如果您使用的是Google,则可以在较旧的Windows上找到可模仿此api的c#包装器.

This is an os feature, not a c# library, in that sense not what you asked. But it roughly covers the same ground: a more versatile messagebox api, that relieves you from manually layouting simple dialogs. If you google, you can find c# wrappers that emulate this api on older windows.

最后,这是博客条目如何在其中使用c#

这篇关于JOptionPane是否等效于C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 06:11
查看更多