简体   繁体   English

C#,字体对话框不显示在 windows XP 上

[英]C#, fontdialog doesn't show up on windows XP

I have a weird problem.我有一个奇怪的问题。

I am developing an application where the user can select a font from a fontdialog by clicking on a button.我正在开发一个应用程序,用户可以通过单击按钮从字体对话框中 select 字体。

The problem is when running on win XP the fontdialog doesn't show up.问题是在 win XP 上运行时 fontdialog 不显示。 If I press ALT key it shows up (after I click on the font button).如果我按下 ALT 键,它就会出现(在我点击字体按钮之后)。

I searched web for a solution and found a guy with similar problem and his quick solution was programmatically press ALT.我搜索了 web 的解决方案,发现了一个有类似问题的人,他的快速解决方案是以编程方式按 ALT。 Of course, how could I press ALT during/after fontdialog.ShowDialog()?当然,我怎么能在 fontdialog.ShowDialog() 期间/之后按 ALT? It's not really clean, thought.它不是很干净,想。

Thanks for any advice.感谢您的任何建议。

Petr彼得

[resolved] [解决]

I had the buttons and stuff on a tabpage.我在标签页上有按钮和东西。 And in it's paint method I had something which didn't belonged there.在它的绘画方法中,我有一些不属于那里的东西。 After I commented it out, it works!在我注释掉它之后,它起作用了!

Thanks谢谢

Petr彼得

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM