有没有一种简单的方法可以在 WinForms 应用程序中显示扑克牌?

发布于 2024-07-27 17:04:13 字数 200 浏览 5 评论 0原文

我正在编写一个快速的 BlackJack Winforms 应用程序来演示几个概念。 引擎本身相当简单,但是,我想在 WinForm 上显示实际的扑克牌。

是否有一个我可以使用的图书馆(最好是免费的)可以显示卡片。

当然,很久以前就有了 cards.dll,但它是非托管的。 寻找托管的东西(或者至少是 cards.dll 的托管包装)。

I am writing a quickie BlackJack Winforms app to demonstrate a couple of concepts. The engine itself is fairly simple, however, I'd like to display actual playing cards on the WinForm.

Is there a library out there that I can use (preferably free) that allows the display the cards.

There is, of course, the cards.dll from way back in the day, but it's unmanaged. Looking for something managed (or at least a managed wrapper around cards.dll).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

以往的大感动 2024-08-03 17:04:13

不确定这有多好,但快速搜索发现在 codeplex 上有 PlayingCards。 看来您可以提取 PlayingCardsLibrary 项目并使用它。 或者根据需要修改它。

Not sure how good this is, but a quick search found PlayingCards on codeplex. It looks like you might be able to pull out the PlayingCardsLibrary project and use that. Or modify it as needed.

一生独一 2024-08-03 17:04:13

cards.dll曾经在windows中,用于支持内置的纸牌游戏。 此处显示了它的 C# 接口。 作者将卡片面朝下显示,但简单的参数更改将使它们面朝上显示。 该 dll 很可能仍在 Windows 中,如果没有,您可以在线下载它。

编辑:

似乎已经从 Vista 中消失了,但就像我说的,它可以从多个在线来源获得,或者从您附近机器上的较旧的 MS 操作系统获得:-)

cards.dll used to be in windows, for supporting the built-in card games. There's a C# interface to it shown here. The author is displaying the cards face down, but a simple parameter change will show them face up. The dll may well still be in Windows, if not you can download it online.

Edit:

seems to have vanished from Vista, but like I said it's available from multiple sources online, or from an older MS operating system at a machine near you :-)

熊抱啵儿 2024-08-03 17:04:13

在“Windows Presentation Foundation Unleashed”一书中,您可以看到如何创建卡片式自定义控件的示例。 这是一个很好的例子,但它是 WPF 而不是 WinForms。

In the "Windows Presentation Foundation Unleashed" book you can see a example of how create a custom control that is a card. It's a good example but is WPF and not WinForms.

虫児飞 2024-08-03 17:04:13

还有这个库,我已经实际测试过了,似乎工作得很好,并且有一个很棒且易于理解的 API。

http://www.c-sharpcorner.com/ UploadFile/samersarhan/Cards.dllinWindowsControlLibray11232005050452AM/Cards.dllinWindowsControlLibray.aspx

There is also this lib which I have actually tested and seems to work great and has a great and easy to understand API.

http://www.c-sharpcorner.com/UploadFile/samersarhan/Cards.dllinWindowsControlLibray11232005050452AM/Cards.dllinWindowsControlLibray.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文